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
13f402e8
Unverified
Commit
13f402e8
authored
Jul 14, 2025
by
PanZezhong1725
Committed by
GitHub
Jul 14, 2025
Browse files
Merge pull request #327 from YdrMaster/iluvatar
issue/158/feat: 编译天数 ccl
parents
a9dbb97a
31d70fdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
xmake.lua
xmake.lua
+4
-2
xmake/iluvatar.lua
xmake/iluvatar.lua
+30
-2
No files found.
xmake.lua
View file @
13f402e8
...
@@ -94,7 +94,7 @@ option("iluvatar-gpu")
...
@@ -94,7 +94,7 @@ option("iluvatar-gpu")
option_end
()
option_end
()
if
has_config
(
"iluvatar-gpu"
)
then
if
has_config
(
"iluvatar-gpu"
)
then
add_defines
(
"ENABLE_
CUD
A_API"
)
add_defines
(
"ENABLE_
NVIDI
A_API"
)
add_defines
(
"ENABLE_ILUVATAR_CUDA_API"
)
add_defines
(
"ENABLE_ILUVATAR_CUDA_API"
)
includes
(
"xmake/iluvatar.lua"
)
includes
(
"xmake/iluvatar.lua"
)
end
end
...
@@ -148,7 +148,6 @@ end
...
@@ -148,7 +148,6 @@ end
-- InfiniCCL
-- InfiniCCL
option
(
"ccl"
)
option
(
"ccl"
)
set_default
(
false
)
set_default
(
false
)
set_default
(
false
)
set_showmenu
(
true
)
set_showmenu
(
true
)
set_description
(
"Wether to compile implementations for InfiniCCL"
)
set_description
(
"Wether to compile implementations for InfiniCCL"
)
...
@@ -282,6 +281,9 @@ target("infiniccl")
...
@@ -282,6 +281,9 @@ target("infiniccl")
if
has_config
(
"metax-gpu"
)
then
if
has_config
(
"metax-gpu"
)
then
add_deps
(
"infiniccl-metax"
)
add_deps
(
"infiniccl-metax"
)
end
end
if
has_config
(
"iluvatar-gpu"
)
then
add_deps
(
"infiniccl-iluvatar"
)
end
set_languages
(
"cxx17"
)
set_languages
(
"cxx17"
)
...
...
xmake/iluvatar.lua
View file @
13f402e8
...
@@ -43,7 +43,6 @@ target("infiniop-iluvatar")
...
@@ -43,7 +43,6 @@ target("infiniop-iluvatar")
set_warnings
(
"all"
,
"error"
)
set_warnings
(
"all"
,
"error"
)
add_cuflags
(
"-fPIC"
,
"-x"
,
"ivcore"
,
"-std=c++17"
,
{
force
=
true
})
add_cuflags
(
"-fPIC"
,
"-x"
,
"ivcore"
,
"-std=c++17"
,
{
force
=
true
})
add_cuflags
(
"-fPIC"
)
add_culdflags
(
"-fPIC"
)
add_culdflags
(
"-fPIC"
)
add_cxflags
(
"-fPIC"
)
add_cxflags
(
"-fPIC"
)
...
@@ -64,10 +63,39 @@ target("infinirt-iluvatar")
...
@@ -64,10 +63,39 @@ target("infinirt-iluvatar")
set_warnings
(
"all"
,
"error"
)
set_warnings
(
"all"
,
"error"
)
add_cuflags
(
"-fPIC"
,
"-x"
,
"ivcore"
,
"-std=c++17"
,
{
force
=
true
})
add_cuflags
(
"-fPIC"
,
"-x"
,
"ivcore"
,
"-std=c++17"
,
{
force
=
true
})
add_cuflags
(
"-fPIC"
)
add_culdflags
(
"-fPIC"
)
add_culdflags
(
"-fPIC"
)
add_cxflags
(
"-fPIC"
)
add_cxflags
(
"-fPIC"
)
-- set_languages("cxx17") 天数似乎不能用这个配置
-- set_languages("cxx17") 天数似乎不能用这个配置
add_files
(
"../src/infinirt/cuda/*.cu"
)
add_files
(
"../src/infinirt/cuda/*.cu"
)
target_end
()
target_end
()
target
(
"infiniccl-iluvatar"
)
set_kind
(
"static"
)
add_deps
(
"infinirt"
)
on_install
(
function
(
target
)
end
)
if
has_config
(
"ccl"
)
then
set_toolchains
(
"iluvatar.toolchain"
)
add_rules
(
"iluvatar.env"
)
set_values
(
"cuda.rdc"
,
false
)
add_links
(
"cudart"
)
set_warnings
(
"all"
,
"error"
)
add_cuflags
(
"-fPIC"
,
"-x"
,
"ivcore"
,
"-std=c++17"
,
{
force
=
true
})
add_culdflags
(
"-fPIC"
)
add_cxflags
(
"-fPIC"
)
local
nccl_root
=
os.getenv
(
"NCCL_ROOT"
)
if
nccl_root
then
add_includedirs
(
nccl_root
..
"/include"
)
add_links
(
nccl_root
..
"/lib/libnccl.so"
)
else
add_links
(
"nccl"
)
-- Fall back to default nccl linking
end
-- set_languages("cxx17") 天数似乎不能用这个配置
add_files
(
"../src/infiniccl/cuda/*.cu"
)
end
target_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