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
bcb90f2a
Unverified
Commit
bcb90f2a
authored
Feb 24, 2025
by
Jiashi Li
Committed by
GitHub
Feb 24, 2025
Browse files
Merge pull request #9 from homorunner/main
support Windows build
parents
dd1161e3
e62bdb4d
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 @
bcb90f2a
...
@@ -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