CUDAPluggableAllocator — PyTorch 2.0 documentation (original) (raw)

class torch.cuda.CUDAPluggableAllocator(path_to_so_file, alloc_fn_name, free_fn_name)[source]

CUDA memory allocator loaded from a so file.

Memory allocators are compiled in .so files and loaded dynamically using ctypes. To change the active allocator use the torch.memory.cuda.change_current_allocator()function.

Parameters:

Warning

This is currently supported only in unix OSs