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

Function memcpy_host_to_device

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

Source from the content-addressed store, hash-verified

222
223# Wrapper for cudaMemcpy which infers copy size and does error checking
224def memcpy_host_to_device(device_ptr: int, host_arr: np.ndarray):
225 nbytes = host_arr.size * host_arr.itemsize
226 cuda_call(cudart.cudaMemcpy(device_ptr, host_arr, nbytes, cudart.cudaMemcpyKind.cudaMemcpyHostToDevice))
227
228
229# Wrapper for cudaMemcpy which infers copy size and does error checking

Callers

nothing calls this directly

Calls 1

cuda_callFunction · 0.85

Tested by

no test coverage detected