Use pinned memory for doing transfers
coreylowman opened this issue · comments
Corey Lowman commented
Eric Christiansen commented
Hey, just to be clear, you mean something like RustaCUDA's LockedBuffer, right?
FYI I need this to switch from RustaCUDA to cudarc.
Corey Lowman commented
Yep, this will be utilizing cuMemAllocHost and cuMemFreeHost underneath the hood, which is also what the LockedBuffer is using.
As far as how this would be integrated into result/safe APIs, we could either:
- Have a separate htod copy method for pinned transfers (htod_pinned_copy)
- Change the existing htod_copy methods to accept something like
AsRef<[T]>
and make sure we can implement that trait for the page locked memory.