mirror of
https://github.com/zebrajr/pytorch.git
synced 2026-01-15 12:15:51 +00:00
# Motivation Memory Pool needs to support the custom `raw_alloc` and `raw_delete` from a custom allocator. # Solution When the custom allocator is provided in the memory pool, use its `raw_alloc` and `raw_delete`. Otherwise, use the `sycl::aligned_alloc_device` and `sycl::free` from SYCL runtime. Pull Request resolved: https://github.com/pytorch/pytorch/pull/168957 Approved by: https://github.com/EikanWang, https://github.com/gujinghui ghstack dependencies: #168956