mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-08 07:39:33 +01:00
Move workspace related functions to separate file Test Plan: Existing tests Differential Revision: D40657708 Pull Request resolved: https://github.com/pytorch/pytorch/pull/87651 Approved by: https://github.com/malfet
37 lines
1005 B
CMake
37 lines
1005 B
CMake
# ---[ CPU files.
|
|
set(Caffe2_CPU_PYTHON_SRCS
|
|
"/pybind_state.cc"
|
|
"/pybind_workspace.cc"
|
|
"/pybind_state_dlpack.cc"
|
|
"/pybind_state_nomni.cc"
|
|
"/pybind_state_registry.cc"
|
|
"/pybind_state_int8.cc"
|
|
)
|
|
|
|
if(USE_MKLDNN)
|
|
set(Caffe2_CPU_PYTHON_SRCS
|
|
${Caffe2_CPU_PYTHON_SRCS}
|
|
"/pybind_state_ideep.cc"
|
|
)
|
|
endif()
|
|
|
|
# ---[ GPU files
|
|
set(Caffe2_GPU_PYTHON_SRCS
|
|
${Caffe2_CPU_PYTHON_SRCS}
|
|
"/pybind_state_gpu.cc"
|
|
)
|
|
|
|
# ---[ HIP files
|
|
set(Caffe2_HIP_PYTHON_SRCS
|
|
${Caffe2_CPU_PYTHON_SRCS}
|
|
"/pybind_state_hip.cc"
|
|
)
|
|
|
|
prepend(Caffe2_CPU_PYTHON_SRCS ${CMAKE_CURRENT_SOURCE_DIR} ${Caffe2_CPU_PYTHON_SRCS})
|
|
prepend(Caffe2_GPU_PYTHON_SRCS ${CMAKE_CURRENT_SOURCE_DIR} ${Caffe2_GPU_PYTHON_SRCS})
|
|
prepend(Caffe2_HIP_PYTHON_SRCS ${CMAKE_CURRENT_SOURCE_DIR} ${Caffe2_HIP_PYTHON_SRCS})
|
|
|
|
set(Caffe2_CPU_PYTHON_SRCS ${Caffe2_CPU_PYTHON_SRCS} PARENT_SCOPE)
|
|
set(Caffe2_GPU_PYTHON_SRCS ${Caffe2_GPU_PYTHON_SRCS} PARENT_SCOPE)
|
|
set(Caffe2_HIP_PYTHON_SRCS ${Caffe2_HIP_PYTHON_SRCS} PARENT_SCOPE)
|