AMDGPU.jl
AMDGPU.jl copied to clipboard
Mem.alloc: Allow using hipMalloc to service allocations
Some libraries, like rocSPARSE, call HIP functions which expect to be passed allocations generated from hipMalloc
and friends. Because hipMalloc
just ends up calling HSA allocation functions, we should be able to use hipMalloc
to service our own allocations (in Mem.alloc
).
That said, I don't entirely trust that this would be a zero-cost change (both in performance and in bug likelihood), so I plan to implement this behind an environment variable or runtime flag.