Remove THCAllocator (#65942)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65942
This one is a bit weird. The class is called `THCIpcDeleter` but it
actually has nothing IPC-specific. It just converts
`std::shared_ptr` + `void*` into a `c10::DataPtr`. Instead, moving
the `DataPtr` conversion into the actual IPC code allows 2 memory
allocations to be elided by merging 3 separate deletion contexts
into one.
Test Plan: Imported from OSS
Reviewed By: dagitses
Differential Revision: D31386278
Pulled By: ngimel
fbshipit-source-id: 5722beed9dcf680f0eb6bbff30405cff47b21962