Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
79c25f87
Commit
79c25f87
authored
Dec 19, 2025
by
qinyiqun
Browse files
issue/812: 增加CUDA_ARCH选项与CUTLASS支持
parent
fb5e36d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
xmake.lua
xmake.lua
+7
-0
xmake/nvidia.lua
xmake/nvidia.lua
+13
-0
No files found.
xmake.lua
View file @
79c25f87
...
...
@@ -66,6 +66,13 @@ if has_config("cudnn") then
add_defines
(
"ENABLE_CUDNN_API"
)
end
option
(
"cuda_arch"
)
set_showmenu
(
true
)
set_description
(
"Set CUDA GPU architecture (e.g. sm_90)"
)
set_values
(
"sm_50"
,
"sm_60"
,
"sm_70"
,
"sm_75"
,
"sm_80"
,
"sm_86"
,
"sm_89"
,
"sm_90"
,
"sm_90a"
)
set_category
(
"option"
)
option_end
()
-- 寒武纪
option
(
"cambricon-mlu"
)
set_default
(
false
)
...
...
xmake/nvidia.lua
View file @
79c25f87
...
...
@@ -3,6 +3,14 @@ if CUDNN_ROOT ~= nil then
add_includedirs
(
CUDNN_ROOT
..
"/include"
)
end
local
CUTLASS_ROOT
=
os.getenv
(
"CUTLASS_ROOT"
)
or
os.getenv
(
"CUTLASS_HOME"
)
or
os.getenv
(
"CUTLASS_PATH"
)
local
CUTE_ROOT
=
os.getenv
(
"CUTE_ROOT"
)
or
os.getenv
(
"CUTE_HOME"
)
or
os.getenv
(
"CUTE_PATH"
)
if
CUTLASS_ROOT
~=
nil
then
add_includedirs
(
CUTLASS_ROOT
)
add_includedirs
(
CUTE_ROOT
)
end
target
(
"infiniop-nvidia"
)
set_kind
(
"static"
)
add_deps
(
"infini-utils"
)
...
...
@@ -28,6 +36,11 @@ target("infiniop-nvidia")
target
:
add
(
"linkdirs"
,
path
.
directory
(
path
.
directory
(
nvcc_path
))
..
"/lib64/stubs"
)
target
:
add
(
"links"
,
"cuda"
)
local
cuda_arch
=
get_config
(
"cuda_arch"
)
if
cuda_arch
~=
nil
then
target
:
add
(
"cu-cxxflags"
,
"-arch="
,
cuda_arch
)
end
end
end
)
...
...
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