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
95623d82
Unverified
Commit
95623d82
authored
Jul 14, 2025
by
PanZezhong1725
Committed by
GitHub
Jul 14, 2025
Browse files
Merge pull request #328 from YdrMaster/main
issue/158/refactor: 分离天数和英伟达的算子定义
parents
e3022fa8
d9de5133
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
+12
-5
src/infinirt/cuda/infinirt_cuda.cu
src/infinirt/cuda/infinirt_cuda.cu
+1
-1
src/infinirt/cuda/infinirt_cuda.cuh
src/infinirt/cuda/infinirt_cuda.cuh
+1
-1
test/infiniop/libinfiniop/utils.py
test/infiniop/libinfiniop/utils.py
+7
-0
xmake.lua
xmake.lua
+1
-2
xmake/iluvatar.lua
xmake/iluvatar.lua
+2
-1
No files found.
src/infinirt/cuda/infinirt_cuda.cu
View file @
95623d82
...
...
@@ -38,7 +38,7 @@ infiniStatus_t streamSynchronize(infinirtStream_t stream) {
}
infiniStatus_t
streamWaitEvent
(
infinirtStream_t
stream
,
infinirtEvent_t
event
)
{
#ifdef ENABLE_ILUVATAR_
CUDA_
API
#ifdef ENABLE_ILUVATAR_API
return
INFINI_STATUS_NOT_IMPLEMENTED
;
#else
CHECK_CUDART
(
cudaStreamWaitEvent
((
cudaStream_t
)
stream
,
(
cudaEvent_t
)
event
));
...
...
src/infinirt/cuda/infinirt_cuda.cuh
View file @
95623d82
...
...
@@ -3,7 +3,7 @@
#include "../infinirt_impl.h"
namespace
infinirt
::
cuda
{
#ifdef
ENABLE_NVIDIA_API
#if
def
ined(
ENABLE_NVIDIA_API
) || defined(ENABLE_ILUVATAR_API)
INFINIRT_DEVICE_API_IMPL
#else
INFINIRT_DEVICE_API_NOOP
...
...
test/infiniop/libinfiniop/utils.py
View file @
95623d82
...
...
@@ -262,6 +262,11 @@ def get_args():
action
=
"store_true"
,
help
=
"Run NVIDIA GPU test"
,
)
parser
.
add_argument
(
"--iluvatar"
,
action
=
"store_true"
,
help
=
"Run Iluvatar GPU test"
,
)
parser
.
add_argument
(
"--cambricon"
,
action
=
"store_true"
,
...
...
@@ -566,6 +571,8 @@ def get_test_devices(args):
devices_to_test
.
append
(
InfiniDeviceEnum
.
CPU
)
if
args
.
nvidia
:
devices_to_test
.
append
(
InfiniDeviceEnum
.
NVIDIA
)
if
args
.
iluvatar
:
devices_to_test
.
append
(
InfiniDeviceEnum
.
ILUVATAR
)
if
args
.
cambricon
:
import
torch_mlu
...
...
xmake.lua
View file @
95623d82
...
...
@@ -94,8 +94,7 @@ option("iluvatar-gpu")
option_end
()
if
has_config
(
"iluvatar-gpu"
)
then
add_defines
(
"ENABLE_NVIDIA_API"
)
add_defines
(
"ENABLE_ILUVATAR_CUDA_API"
)
add_defines
(
"ENABLE_ILUVATAR_API"
)
includes
(
"xmake/iluvatar.lua"
)
end
...
...
xmake/iluvatar.lua
View file @
95623d82
...
...
@@ -42,12 +42,13 @@ target("infiniop-iluvatar")
add_links
(
"cudart"
,
"cublas"
,
"cudnn"
)
set_warnings
(
"all"
,
"error"
)
add_cuflags
(
"-Wno-error=unused-private-field"
)
add_cuflags
(
"-fPIC"
,
"-x"
,
"ivcore"
,
"-std=c++17"
,
{
force
=
true
})
add_culdflags
(
"-fPIC"
)
add_cxflags
(
"-fPIC"
)
-- set_languages("cxx17") 天数似乎不能用这个配置
add_files
(
"../src/infiniop/devices/
cud
a/*.cu"
,
"../src/infiniop/ops/*/
cud
a/*.cu"
)
add_files
(
"../src/infiniop/devices/
nvidi
a/*.cu"
,
"../src/infiniop/ops/*/
nvidi
a/*.cu"
)
target_end
()
target
(
"infinirt-iluvatar"
)
...
...
Prev
1
2
Next
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