File tree Expand file tree Collapse file tree
source/module_base/module_device Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # list(APPEND module_device_srcs
2- # memory_op.cpp
3- # device.cpp
4- # )
1+ list (APPEND module_device_srcs
2+ memory_op.cpp
3+ device.cpp
4+ )
55
6- # if(USE_CUDA)
7- # list(APPEND module_device_srcs
8- # cuda/memory_op.cu
9- # )
10- # endif()
6+ if (USE_CUDA)
7+ list (APPEND module_device_srcs
8+ cuda/memory_op.cu
9+ )
10+ endif ()
1111
12+ add_library (device OBJECT ${module_device_srcs} )
1213
13- # if(USE_ROCM)
14- # hip_add_library(module_device_rocm STATIC
15- # rocm/memory_op.hip.cu
16- # )
17- # target_link_libraries(
18- # device
19- # module_device_rocm
20- # hip::host
21- # hip::device
22- # hip::hipfft
23- # roc::hipblas
24- # roc::hipsolver
25- # )
26- # endif()
14+ if (USE_ROCM)
15+ hip_add_library (module_device_rocm STATIC
16+ rocm/memory_op.hip.cu
17+ )
18+ target_link_libraries (
19+ device
20+ module_device_rocm
21+ hip::host
22+ hip::device
23+ hip::hipfft
24+ roc::hipblas
25+ roc::hipsolver
26+ )
27+ endif ()
2728
28- # add_library(device OBJECT ${device_srcs})
2929
30- # if(USE_CUDA)
31- # target_link_libraries(
32- # device
33- # )
34- # elseif(USE_ROCM)
35- # target_link_libraries(
36- # device
37- # device_rocm
38- # hip::host
39- # hip::device
40- # hip::hipfft
41- # roc::hipblas
42- # roc::hipsolver
43- # )
44- # endif()
30+
31+ if (USE_CUDA)
32+ target_link_libraries (
33+ device
34+ )
35+ elseif (USE_ROCM)
36+ target_link_libraries (
37+ device
38+ device_rocm
39+ hip::host
40+ hip::device
41+ hip::hipfft
42+ roc::hipblas
43+ roc::hipsolver
44+ )
45+ endif ()
You can’t perform that action at this time.
0 commit comments