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

Merge pull request #326 from YdrMaster/main

issue/291/fix: 改正 conv 中的编译错误和 xmake 中的一些问题
parents 13f402e8 1d8d9623
...@@ -262,12 +262,12 @@ public: ...@@ -262,12 +262,12 @@ public:
workspace_size(other.workspace_size) workspace_size(other.workspace_size)
// clang-format off // clang-format off
#ifdef ENABLE_CUDNN_API #ifdef ENABLE_CUDNN_API
, x_desc(other.x_desc), , x_desc(other.x_desc)
, y_desc(other.y_desc), , y_desc(other.y_desc)
, w_desc(other.w_desc), , w_desc(other.w_desc)
, b_desc(other.b_desc), , b_desc(other.b_desc)
, act_desc(other.act_desc), , act_desc(other.act_desc)
, conv_desc(other.conv_desc), , conv_desc(other.conv_desc)
, algo(other.algo) , algo(other.algo)
#endif #endif
// clang-format on // clang-format on
......
...@@ -49,7 +49,7 @@ option_end() ...@@ -49,7 +49,7 @@ option_end()
if has_config("nv-gpu") then if has_config("nv-gpu") then
add_defines("ENABLE_NVIDIA_API") add_defines("ENABLE_NVIDIA_API")
includes("xmake/cuda.lua") includes("xmake/nvidia.lua")
end end
option("cudnn") option("cudnn")
...@@ -187,7 +187,7 @@ target("infinirt") ...@@ -187,7 +187,7 @@ target("infinirt")
add_deps("infinirt-cpu") add_deps("infinirt-cpu")
end end
if has_config("nv-gpu") then if has_config("nv-gpu") then
add_deps("infinirt-cuda") add_deps("infinirt-nvidia")
end end
if has_config("cambricon-mlu") then if has_config("cambricon-mlu") then
add_deps("infinirt-cambricon") add_deps("infinirt-cambricon")
...@@ -221,7 +221,7 @@ target("infiniop") ...@@ -221,7 +221,7 @@ target("infiniop")
add_deps("infiniop-cpu") add_deps("infiniop-cpu")
end end
if has_config("nv-gpu") then if has_config("nv-gpu") then
add_deps("infiniop-cuda") add_deps("infiniop-nvidia")
end end
if has_config("iluvatar-gpu") then if has_config("iluvatar-gpu") then
add_deps("infiniop-iluvatar") add_deps("infiniop-iluvatar")
...@@ -235,9 +235,9 @@ target("infiniop") ...@@ -235,9 +235,9 @@ target("infiniop")
) )
add_shflags("-s", "-shared", "-fPIC") add_shflags("-s", "-shared", "-fPIC")
add_links("cublas", "cudnn", "cudadevrt", "cudart_static", "rt", "pthread", "dl") add_links("cublas", "cudnn", "cudadevrt", "cudart_static", "rt", "pthread", "dl")
-- Using -linfiniop-cuda will fail, manually link the target using full path -- Using -linfiniop-nvidia will fail, manually link the target using full path
add_deps("nv-gpu", {inherit = false}) add_deps("nv-gpu", {inherit = false})
add_links(builddir.."/libinfiniop-cuda.a") add_links(builddir.."/libinfiniop-nvidia.a")
set_toolchains("sugon-dcu-linker") set_toolchains("sugon-dcu-linker")
end end
...@@ -273,7 +273,7 @@ target("infiniccl") ...@@ -273,7 +273,7 @@ target("infiniccl")
add_deps("infinirt") add_deps("infinirt")
if has_config("nv-gpu") then if has_config("nv-gpu") then
add_deps("infiniccl-cuda") add_deps("infiniccl-nvidia")
end end
if has_config("ascend-npu") then if has_config("ascend-npu") then
add_deps("infiniccl-ascend") add_deps("infiniccl-ascend")
......
...@@ -3,7 +3,7 @@ if CUDNN_ROOT ~= nil then ...@@ -3,7 +3,7 @@ if CUDNN_ROOT ~= nil then
add_includedirs(CUDNN_ROOT .. "/include") add_includedirs(CUDNN_ROOT .. "/include")
end end
target("infiniop-cuda") target("infiniop-nvidia")
set_kind("static") set_kind("static")
add_deps("infini-utils") add_deps("infini-utils")
on_install(function (target) end) on_install(function (target) end)
...@@ -46,10 +46,10 @@ target("infiniop-cuda") ...@@ -46,10 +46,10 @@ target("infiniop-cuda")
add_cuflags("-Xcompiler=-Wno-error=deprecated-declarations") add_cuflags("-Xcompiler=-Wno-error=deprecated-declarations")
set_languages("cxx17") set_languages("cxx17")
add_files("../src/infiniop/devices/nvidia/*.cu", "../src/infiniop/ops/*/cuda/*.cu", "../src/infiniop/ops/*/nvidia/*.cu", "../build/ninetoothed/*.c") add_files("../src/infiniop/devices/nvidia/*.cu", "../src/infiniop/ops/*/nvidia/*.cu", "../build/ninetoothed/*.c")
target_end() target_end()
target("infinirt-cuda") target("infinirt-nvidia")
set_kind("static") set_kind("static")
add_deps("infini-utils") add_deps("infini-utils")
on_install(function (target) end) on_install(function (target) end)
...@@ -71,7 +71,7 @@ target("infinirt-cuda") ...@@ -71,7 +71,7 @@ target("infinirt-cuda")
add_files("../src/infinirt/cuda/*.cu") add_files("../src/infinirt/cuda/*.cu")
target_end() target_end()
target("infiniccl-cuda") target("infiniccl-nvidia")
set_kind("static") set_kind("static")
add_deps("infinirt") add_deps("infinirt")
on_install(function (target) end) on_install(function (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