mirror of
https://github.com/zebrajr/pytorch.git
synced 2026-01-15 12:15:51 +00:00
Summary: Currently in caffe2, one cannot properly fetch the content of Int8 blobs. Upon digging the source code, it turns out that the relevant source code is not being compiled. Adding the source to CMakeLists.txt fixes this issue. First time ever doing a pull request. Please let me know if there's any rule I should follow. Thanks. Pull Request resolved: https://github.com/pytorch/pytorch/pull/15047 Differential Revision: D13417583 Pulled By: bddppq fbshipit-source-id: dd39575971a3012635edbf97a045d80e4b62a8eb
37 lines
986 B
CMake
37 lines
986 B
CMake
# ---[ CPU files.
|
|
set(Caffe2_CPU_PYTHON_SRCS
|
|
"/pybind_state.cc"
|
|
"/pybind_state_dlpack.cc"
|
|
"/pybind_state_nomni.cc"
|
|
"/pybind_state_registry.cc"
|
|
"/pybind_state_int8.cc"
|
|
)
|
|
|
|
if(CAFFE2_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)
|
|
|