-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Description
Context
at::cpp_custom_type_hack
is a deprecated utility to shepherd arbitrary C++ classes through Python by embedding an owning pointer inside a byte Tensor's storage. It's usage is already heavily discouraged:
pytorch/aten/src/ATen/cpp_custom_type_hack.h
Lines 18 to 20 in 2291981
// STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP | |
// YOU ARE IN THE WRONG PLACE! TURN BACK NOW! |
torch/custom_class.h
is now the preferred way to expose C++ classes to Python, however the current uses may be serialized into existing TorchScript
models so these operators must be changed with forward and backward compatibility in mind.
Relevant operators
-
aten::quantized_gru.input_legacy
-
aten::quantized_gru.data_legacy
-
aten::quantized_lstm.input_legacy
-
aten::quantized_lstm.data_legacy
-
aten::fbgemm_linear_int8_weight_fp32_activation
-
aten::fbgemm_pack_quantized_matrix
-
aten::fbgemm_pack_gemm_matrix_fp16
-
aten::fbgemm_linear_fp16_weight_fp32_activation
-
quantized::linear_prepack_legacy
-
quantized::linear_prepack_fp16_legacy
-
_quantized::linear_prepack_fp16_legacy
-
profiler::_record_function_enter
(see Refactor record_function_ops.cpp to not use cpp_custom_type_hack #35026) -
profiler::_record_function_exit
(see Refactor record_function_ops.cpp to not use cpp_custom_type_hack #35026)
cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @Xia-Weiwen @leslie-fang-intel @robieta @chaekit @aaronenyeshi @nbcsm @guotuofeng @guyang3532 @gaoteng-git @tiffzhaofb @dzhulgakov @davidberard98 @ilia-cher @gdankel @bitfort @ngimel @orionr @albanD @malfet