Commit e09a0b7c authored by YdrMaster's avatar YdrMaster
Browse files

issue/158/refactor: 分离天数和英伟达的算子定义


Signed-off-by: default avatarYdrMaster <ydrml@hotmail.com>
parent e3022fa8
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "../infinirt_impl.h" #include "../infinirt_impl.h"
namespace infinirt::cuda { namespace infinirt::cuda {
#ifdef ENABLE_NVIDIA_API #if defined(ENABLE_NVIDIA_API) || defined(ENABLE_ILUVATAR_API)
INFINIRT_DEVICE_API_IMPL INFINIRT_DEVICE_API_IMPL
#else #else
INFINIRT_DEVICE_API_NOOP INFINIRT_DEVICE_API_NOOP
......
...@@ -94,8 +94,7 @@ option("iluvatar-gpu") ...@@ -94,8 +94,7 @@ option("iluvatar-gpu")
option_end() option_end()
if has_config("iluvatar-gpu") then if has_config("iluvatar-gpu") then
add_defines("ENABLE_NVIDIA_API") add_defines("ENABLE_ILUVATAR_API")
add_defines("ENABLE_ILUVATAR_CUDA_API")
includes("xmake/iluvatar.lua") includes("xmake/iluvatar.lua")
end end
......
...@@ -42,12 +42,13 @@ target("infiniop-iluvatar") ...@@ -42,12 +42,13 @@ target("infiniop-iluvatar")
add_links("cudart", "cublas", "cudnn") add_links("cudart", "cublas", "cudnn")
set_warnings("all", "error") set_warnings("all", "error")
add_cuflags("-Wno-error=unused-private-field")
add_cuflags("-fPIC", "-x", "ivcore", "-std=c++17", {force = true}) add_cuflags("-fPIC", "-x", "ivcore", "-std=c++17", {force = true})
add_culdflags("-fPIC") add_culdflags("-fPIC")
add_cxflags("-fPIC") add_cxflags("-fPIC")
-- set_languages("cxx17") 天数似乎不能用这个配置 -- set_languages("cxx17") 天数似乎不能用这个配置
add_files("../src/infiniop/devices/cuda/*.cu", "../src/infiniop/ops/*/cuda/*.cu") add_files("../src/infiniop/devices/nvidia/*.cu", "../src/infiniop/ops/*/nvidia/*.cu")
target_end() target_end()
target("infinirt-iluvatar") target("infinirt-iluvatar")
......
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