Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
FlashMLA
Commits
e62bdb4d
"ssh:/git@developer.sourcefind.cn:2222/OpenDAS/flashmla.git" did not exist on "4fbaa9527c3dc9ced8457bc051023c1859cccde7"
Commit
e62bdb4d
authored
Feb 24, 2025
by
程元
Browse files
support Windows build
parent
414a2f3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
setup.py
setup.py
+8
-1
No files found.
setup.py
View file @
e62bdb4d
...
@@ -8,6 +8,7 @@ from setuptools import setup, find_packages
...
@@ -8,6 +8,7 @@ from setuptools import setup, find_packages
from
torch.utils.cpp_extension
import
(
from
torch.utils.cpp_extension
import
(
BuildExtension
,
BuildExtension
,
CUDAExtension
,
CUDAExtension
,
IS_WINDOWS
,
)
)
...
@@ -24,6 +25,11 @@ cc_flag.append("arch=compute_90a,code=sm_90a")
...
@@ -24,6 +25,11 @@ cc_flag.append("arch=compute_90a,code=sm_90a")
this_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
this_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
if
IS_WINDOWS
:
cxx_args
=
[
"/O2"
,
"/std:c++17"
,
"/DNDEBUG"
,
"/W0"
]
else
:
cxx_args
=
[
"-O3"
,
"-std=c++17"
,
"-DNDEBUG"
,
"-Wno-deprecated-declarations"
]
ext_modules
=
[]
ext_modules
=
[]
ext_modules
.
append
(
ext_modules
.
append
(
CUDAExtension
(
CUDAExtension
(
...
@@ -33,12 +39,13 @@ ext_modules.append(
...
@@ -33,12 +39,13 @@ ext_modules.append(
"csrc/flash_fwd_mla_bf16_sm90.cu"
,
"csrc/flash_fwd_mla_bf16_sm90.cu"
,
],
],
extra_compile_args
=
{
extra_compile_args
=
{
"cxx"
:
[
"-O3"
,
"-std=c++17"
,
"-DNDEBUG"
,
"-Wno-deprecated-declarations"
]
,
"cxx"
:
cxx_args
,
"nvcc"
:
append_nvcc_threads
(
"nvcc"
:
append_nvcc_threads
(
[
[
"-O3"
,
"-O3"
,
"-std=c++17"
,
"-std=c++17"
,
"-DNDEBUG"
,
"-DNDEBUG"
,
"-D_USE_MATH_DEFINES"
,
"-Wno-deprecated-declarations"
,
"-Wno-deprecated-declarations"
,
"-U__CUDA_NO_HALF_OPERATORS__"
,
"-U__CUDA_NO_HALF_OPERATORS__"
,
"-U__CUDA_NO_HALF_CONVERSIONS__"
,
"-U__CUDA_NO_HALF_CONVERSIONS__"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment