@@ -254,7 +254,6 @@ else()
254
254
${ATen_XPU_MKL_SRCS}
255
255
${ATen_XPU_NATIVE_CPP_SRCS}
256
256
${ATen_XPU_GEN_SRCS} )
257
- install (TARGETS torch_xpu_ops DESTINATION "${TORCH_INSTALL_LIB_DIR} " )
258
257
target_compile_definitions (torch_xpu_ops PRIVATE TORCH_XPU_BUILD_MAIN_LIB)
259
258
# Split SYCL kernels into 2 libraries as categories 1) Common (Unary+Binary+Reduce+Pow+Copy+Activation+Foreach) 2) Others.
260
259
set (ATen_XPU_SYCL_COMMON_SRCS)
@@ -267,6 +266,10 @@ else()
267
266
string (REGEX MATCH "Reduce" IS_REDUCE ${sycl_src} )
268
267
string (REGEX MATCH "Activation" IS_ACTIVATION ${sycl_src} )
269
268
string (REGEX MATCH "Foreach" IS_FOREACH ${sycl_src} )
269
+ string (REGEX MATCH "Norm" IS_NORM ${sycl_src} )
270
+ string (REGEX MATCH "Loss" IS_LOSS ${sycl_src} )
271
+ string (REGEX MATCH "Resize" IS_RESIZE ${sycl_src} )
272
+ string (REGEX MATCH "Distribution" IS_DISTRIBUTION ${sycl_src} )
270
273
271
274
if (NOT IS_FOREACH STREQUAL "" )
272
275
list (APPEND ATen_XPU_SYCL_COMMON_SRCS ${sycl_src} )
@@ -278,6 +281,14 @@ else()
278
281
list (APPEND ATen_XPU_SYCL_COMMON_SRCS ${sycl_src} )
279
282
elseif (NOT IS_ACTIVATION STREQUAL "" )
280
283
list (APPEND ATen_XPU_SYCL_COMMON_SRCS ${sycl_src} )
284
+ elseif (NOT IS_NORM STREQUAL "" )
285
+ list (APPEND ATen_XPU_SYCL_COMMON_SRCS ${sycl_src} )
286
+ elseif (NOT IS_LOSS STREQUAL "" )
287
+ list (APPEND ATen_XPU_SYCL_COMMON_SRCS ${sycl_src} )
288
+ elseif (NOT IS_RESIZE STREQUAL "" )
289
+ list (APPEND ATen_XPU_SYCL_COMMON_SRCS ${sycl_src} )
290
+ elseif (NOT IS_DISTRIBUTION STREQUAL "" )
291
+ list (APPEND ATen_XPU_SYCL_COMMON_SRCS ${sycl_src} )
281
292
else ()
282
293
list (APPEND ATen_XPU_SYCL_OTHERS_SRCS ${sycl_src} )
283
294
endif ()
@@ -291,9 +302,6 @@ else()
291
302
target_compile_definitions (${sycl_common_lib} PRIVATE TORCH_XPU_BUILD_MAIN_LIB)
292
303
list (APPEND TORCH_XPU_OPS_LIBRARIES ${sycl_common_lib} )
293
304
294
- # Decouple with PyTorch cmake definition.
295
- install (TARGETS ${sycl_common_lib} DESTINATION "${TORCH_INSTALL_LIB_DIR} " )
296
-
297
305
# Other kernel lib
298
306
set (sycl_lib torch_xpu_ops_sycl_kernels)
299
307
sycl_add_library(
@@ -303,9 +311,6 @@ else()
303
311
target_compile_definitions (${sycl_lib} PRIVATE TORCH_XPU_BUILD_MAIN_LIB)
304
312
list (APPEND TORCH_XPU_OPS_LIBRARIES ${sycl_lib} )
305
313
306
- # Decouple with PyTorch cmake definition.
307
- install (TARGETS ${sycl_lib} DESTINATION "${TORCH_INSTALL_LIB_DIR} " )
308
-
309
314
target_link_libraries (torch_xpu_ops
310
315
PUBLIC
311
316
${sycl_common_lib}
0 commit comments