Skip to content

Removing deprecated cpp_custom_type_hack #72263

@peterbell10

Description

@peterbell10

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:

// 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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    better-engineeringRelatively self-contained tasks for better engineering contributorsoncall: jitAdd this issue/PR to JIT oncall triage queueoncall: quantizationQuantization support in PyTorchtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions