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
5cbe635d
Commit
5cbe635d
authored
May 19, 2026
by
zhanghj2
Browse files
支持aicc编译
parent
902e3032
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
setup.py
setup.py
+21
-5
No files found.
setup.py
View file @
5cbe635d
...
@@ -31,7 +31,7 @@ def get_features_args():
...
@@ -31,7 +31,7 @@ def get_features_args():
def
get_arch_flags
():
def
get_arch_flags
():
arch_flags
=
[]
arch_flags
=
[]
arch_flags
.
append
(
"--offload-arch=gfx938
;
gfx936
;
gfx928"
)
arch_flags
.
append
(
"--offload-arch=gfx938
,
gfx936
,
gfx928"
)
return
arch_flags
return
arch_flags
# def get_nvcc_thread_args():
# def get_nvcc_thread_args():
...
@@ -41,12 +41,28 @@ def get_arch_flags():
...
@@ -41,12 +41,28 @@ def get_arch_flags():
# subprocess.run(["git", "submodule", "update", "--init", "csrc/cutlass"])
# subprocess.run(["git", "submodule", "update", "--init", "csrc/cutlass"])
this_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
this_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
os
.
environ
[
'PYTORCH_NVCC'
]
=
'aicc'
if
False
:
if
False
:
cxx_args
=
[
"/O2"
,
"/std:c++20"
,
"/DNDEBUG"
,
"/W0"
]
cxx_args
=
[
"/O2"
,
"/std:c++20"
,
"/DNDEBUG"
,
"/W0"
]
else
:
else
:
cxx_args
=
[
"-O3"
,
"-std=c++20"
,
"-DNDEBUG"
,
"-Wno-deprecated-declarations"
,
"-DDCU_ASM"
,
"-Wno-return-type"
,
]
cxx_args
=
[
"-O3"
,
"-std=c++20"
,
"-DNDEBUG"
,
"-Wno-deprecated-declarations"
,
"-DDCU_ASM"
,
"-Wno-return-type"
,
]
aicc_flags
=
[
"-mcode-object-version=5"
,
"-mllvm=-support-768-vgprs=true"
,
"-mllvm=-disable-machine-sink"
,
"-mllvm=-disable-code-sink"
,
"-mllvm=-amdgpu-enable-rewrite-partial-reg-uses=false"
,
"-mllvm=-allow-gvn-convergent-call=true"
,
"-mllvm=-disallow-uniform-vmed3-combine=true"
,
"-mllvm=-hcu-pre-emit-load-store-opt=false"
,
"-mllvm=-amdgpu-early-inline-all=true"
,
"-mllvm=-amdgpu-function-calls=false"
,
"-fno-finite-math-only"
,
"--gpu-max-threads-per-block=256"
]
ext_modules
=
[]
ext_modules
=
[]
ext_modules
.
append
(
ext_modules
.
append
(
...
@@ -103,11 +119,11 @@ ext_modules.append(
...
@@ -103,11 +119,11 @@ ext_modules.append(
"-ftemplate-backtrace-limit=0"
,
"-ftemplate-backtrace-limit=0"
,
"-Rpass-analysis=kernel-resource-usage"
,
"-Rpass-analysis=kernel-resource-usage"
,
"-DDCU_ASM"
,
"-DDCU_ASM"
,
"--save-temps"
,
#
"--save-temps",
"-w"
,
"-w"
,
"-mllvm -enable-num-vgprs-512=true"
,
#
"-mllvm -enable-num-vgprs-512=true",
"-mllvm -allow-cse-cross-bb-convergent-call=true"
,
#
"-mllvm -allow-cse-cross-bb-convergent-call=true",
"-mllvm -full-vectorize-slp=true"
,
#
"-mllvm -full-vectorize-slp=true",
]
+
get_features_args
()
+
get_arch_flags
()
]
+
get_features_args
()
+
get_arch_flags
()
},
},
include_dirs
=
[
include_dirs
=
[
...
...
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