Skip to content

Commit 151a19e

Browse files
authored
Export EmptyTensor.h to public (#935)
# Motivation Export `<ATen/xpu/EmptyTensor.h>` to public (the counterpart location of CUDA is `${AT_INSTALL_INCLUDE_DIR}/ATen/cuda`) as it is used in codegen, refer to https://github.com/pytorch/pytorch/pull/130082/files#r1696016201 Otherwise, IPEX finds it hard to reuse this codegen due to the non-exist file of `<ATen/xpu/EmptyTensor.h>`. The same reason applies to libtorch, which is one pure C++ code.
1 parent cbcbc3b commit 151a19e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ATen/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ATen XPU sources
22

3+
file(GLOB xpu_h "xpu/*.h")
34
file(GLOB xpu_cpp "xpu/*.cpp")
45
file(GLOB xpu_native_cpp "native/xpu/*.cpp" "native/sparse/*.cpp")
56
file(GLOB xpu_sycl "native/xpu/sycl/*.cpp")
@@ -11,3 +12,7 @@ list(APPEND ATen_XPU_SYCL_SRCS ${xpu_sycl})
1112
set(ATen_XPU_CPP_SRCS ${ATen_XPU_CPP_SRCS} PARENT_SCOPE)
1213
set(ATen_XPU_NATIVE_CPP_SRCS ${ATen_XPU_NATIVE_CPP_SRCS} PARENT_SCOPE)
1314
set(ATen_XPU_SYCL_SRCS ${ATen_XPU_SYCL_SRCS} PARENT_SCOPE)
15+
16+
foreach(HEADER ${xpu_h})
17+
install(FILES ${HEADER} DESTINATION "${AT_INSTALL_INCLUDE_DIR}/ATen/xpu")
18+
endforeach()

0 commit comments

Comments
 (0)