MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / memcpy_device_to_host

Function memcpy_device_to_host

samples/python/common.py:230–232  ·  view source on GitHub ↗
(host_arr: np.ndarray, device_ptr: int)

Source from the content-addressed store, hash-verified

228
229# Wrapper for cudaMemcpy which infers copy size and does error checking
230def memcpy_device_to_host(host_arr: np.ndarray, device_ptr: int):
231 nbytes = host_arr.size * host_arr.itemsize
232 cuda_call(cudart.cudaMemcpy(host_arr, device_ptr, nbytes, cudart.cudaMemcpyKind.cudaMemcpyDeviceToHost))
233
234
235def _do_inference_base(inputs, outputs, stream, execute_async):

Callers

nothing calls this directly

Calls 1

cuda_callFunction · 0.85

Tested by

no test coverage detected