Given const GPU memory, returns a librocm device pointer datatype, suitable for passing directly to librocm APIs. N.B. we must lose constness in order to pass a suitable type to the existing librocm APIs, so the caller should take care to only pass the result of const GPU memory conversions to librocm functions which will honor constness.
| 78 | // librocm APIs, so the caller should take care to only pass the result of const |
| 79 | // GPU memory conversions to librocm functions which will honor constness. |
| 80 | static hipDeviceptr_t AsROCmDevicePtr(const DeviceMemoryBase& gpu_mem) { |
| 81 | return const_cast<hipDeviceptr_t>(gpu_mem.opaque()); |
| 82 | } |
| 83 | |
| 84 | // See description on const version above. |
| 85 | static hipDeviceptr_t AsROCmDevicePtr(DeviceMemoryBase* gpu_mem) { |
no test coverage detected