11# ATen XPU sources
22
33file (GLOB xpu_cpp "xpu/*.cpp" )
4- file (GLOB xpu_mkl "native/xpu/mkl/*.cpp" )
54file (GLOB xpu_native_cpp "native/xpu/*.cpp" "native/sparse/*.cpp" "native/sparse/xpu/*.cpp" "native/nested/*.cpp" "native/nested/xpu/*.cpp" "native/transformers/*.cpp" "native/quantized/*.cpp" )
65file (GLOB xpu_sycl "native/xpu/sycl/*.cpp" "native/sparse/xpu/sycl/*.cpp" "native/nested/xpu/sycl/*.cpp" "native/transformers/sycl/*.cpp" "native/quantized/sycl/*.cpp" )
76
87list (APPEND ATen_XPU_CPP_SRCS ${xpu_cpp} )
98if (USE_ONEMKL_XPU)
9+ file (GLOB xpu_mkl "native/xpu/mkl/*.cpp" )
1010 list (APPEND ATen_XPU_MKL_SRCS ${xpu_mkl} )
1111endif ()
1212list (APPEND ATen_XPU_NATIVE_CPP_SRCS ${xpu_native_cpp} )
@@ -19,25 +19,25 @@ set(ATen_XPU_SYCL_SRCS ${ATen_XPU_SYCL_SRCS} PARENT_SCOPE)
1919
2020# ATen XPU headers
2121
22- macro (install_xpu_headers glob_pattern dest_subdir )
23- file (GLOB headers ${glob_pattern} )
22+ macro (install_xpu_headers subdir )
23+ file (GLOB headers CONFIGURE_DEPENDS " ${subdir} /*.h" )
2424 if (headers)
25- install (FILES ${headers} DESTINATION "${AT_INSTALL_INCLUDE_DIR} /${dest_subdir } " )
25+ install (FILES ${headers} DESTINATION "${AT_INSTALL_INCLUDE_DIR} /ATen/ ${subdir } " )
2626 endif ()
2727endmacro ()
2828
29- install_xpu_headers("xpu/*.h" "ATen/xpu " )
30- install_xpu_headers("native/xpu/*.h" "ATen/native/xpu " )
31- install_xpu_headers("native/xpu/sycl/*.h" "ATen/native/xpu/sycl " )
32- install_xpu_headers("native/xpu/mkl/*.h" "ATen/native/xpu/mkl " )
33- install_xpu_headers("native/nested/xpu/*.h" "ATen/native/nested/xpu " )
34- install_xpu_headers("native/nested/xpu/sycl/*.h" "ATen/native/nested/xpu/sycl " )
35- install_xpu_headers("native/quantized/*.h" "ATen/native/quantized/ xpu" )
36- install_xpu_headers("native/quantized/sycl/*.h" "ATen/native/quantized/ xpu/sycl" )
37- install_xpu_headers("native/sparse/xpu/*.h" "ATen/native/sparse/xpu " )
38- install_xpu_headers("native/sparse/xpu/sycl/*.h" "ATen/native/sparse/xpu/sycl " )
39- install_xpu_headers("native/transformers/*.h" "ATen/native/transformers/ xpu" )
40- install_xpu_headers("native/transformers/sycl/*.h" "ATen/native/transformers/ xpu/sycl" )
29+ install_xpu_headers("xpu" )
30+ install_xpu_headers("native/xpu" )
31+ install_xpu_headers("native/xpu/sycl" )
32+ install_xpu_headers("native/xpu/mkl" )
33+ install_xpu_headers("native/nested/xpu" )
34+ install_xpu_headers("native/nested/xpu/sycl" )
35+ install_xpu_headers("native/quantized/xpu" )
36+ install_xpu_headers("native/quantized/xpu/sycl" )
37+ install_xpu_headers("native/sparse/xpu" )
38+ install_xpu_headers("native/sparse/xpu/sycl" )
39+ install_xpu_headers("native/transformers/xpu" )
40+ install_xpu_headers("native/transformers/xpu/sycl" )
4141
4242if (xpu_ops_generated_headers)
4343 install (FILES ${xpu_ops_generated_headers} DESTINATION ${AT_INSTALL_INCLUDE_DIR} /ATen/ops)
0 commit comments