Skip to content

Commit 914789e

Browse files
authored
Update CMakeLists.txt
1 parent db3e7f1 commit 914789e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

backends/metax_gpu/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,11 @@ file(
809809
set(CUSTOM_DEVICE_SRCS ${CUDA_SRCS} ${CC_SRCS} ${ERNIE_CORE_SRCS})
810810

811811
set_source_files_properties(${CUSTOM_DEVICE_SRCS} PROPERTIES LANGUAGE CUDA)
812+
# 为weight_only_linear_kernel.cu添加Metax GPU架构支持
813+
set_source_files_properties(
814+
${CMAKE_CURRENT_SOURCE_DIR}/kernels/custom_kernel/weight_only_linear_kernel.cu
815+
PROPERTIES COMPILE_OPTIONS "--offload-arch=xcore1000;--offload-arch=xcore1500")
816+
812817
set(MACA_PATH $ENV{MACA_PATH})
813818
set(CMAKE_CUCC_COMPILER "cucc")
814819
set(CMAKE_CUCC_FLAGS "-I ${MACA_PATH}/tools/cu-bridge/include/")

0 commit comments

Comments
 (0)