Unverified Commit 13f402e8 authored by PanZezhong1725's avatar PanZezhong1725 Committed by GitHub
Browse files

Merge pull request #327 from YdrMaster/iluvatar

issue/158/feat: 编译天数 ccl
parents a9dbb97a 31d70fdb
......@@ -94,7 +94,7 @@ option("iluvatar-gpu")
option_end()
if has_config("iluvatar-gpu") then
add_defines("ENABLE_CUDA_API")
add_defines("ENABLE_NVIDIA_API")
add_defines("ENABLE_ILUVATAR_CUDA_API")
includes("xmake/iluvatar.lua")
end
......@@ -148,7 +148,6 @@ end
-- InfiniCCL
option("ccl")
set_default(false)
set_default(false)
set_showmenu(true)
set_description("Wether to compile implementations for InfiniCCL")
......@@ -282,6 +281,9 @@ target("infiniccl")
if has_config("metax-gpu") then
add_deps("infiniccl-metax")
end
if has_config("iluvatar-gpu") then
add_deps("infiniccl-iluvatar")
end
set_languages("cxx17")
......
......@@ -43,7 +43,6 @@ target("infiniop-iluvatar")
set_warnings("all", "error")
add_cuflags("-fPIC", "-x", "ivcore", "-std=c++17", {force = true})
add_cuflags("-fPIC")
add_culdflags("-fPIC")
add_cxflags("-fPIC")
......@@ -64,10 +63,39 @@ target("infinirt-iluvatar")
set_warnings("all", "error")
add_cuflags("-fPIC", "-x", "ivcore", "-std=c++17", {force = true})
add_cuflags("-fPIC")
add_culdflags("-fPIC")
add_cxflags("-fPIC")
-- set_languages("cxx17") 天数似乎不能用这个配置
add_files("../src/infinirt/cuda/*.cu")
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()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment