MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AsROCmDevicePtr

Function AsROCmDevicePtr

tensorflow/stream_executor/rocm/rocm_gpu_executor.cc:80–82  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
80static 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.
85static hipDeviceptr_t AsROCmDevicePtr(DeviceMemoryBase* gpu_mem) {

Callers 8

SynchronousMemZeroMethod · 0.85
SynchronousMemSetMethod · 0.85
SynchronousMemcpyMethod · 0.85
MemsetMethod · 0.85
Memset32Method · 0.85
MemcpyMethod · 0.85
MemcpyDeviceToDeviceMethod · 0.85

Calls 1

opaqueMethod · 0.80

Tested by

no test coverage detected