MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / todevice

Function todevice

python/cutlass_cppgen/backend/memory_manager.py:92–99  ·  view source on GitHub ↗

Pass the host_data to device memory

(host_data, dtype=np.float32)

Source from the content-addressed store, hash-verified

90
91
92def todevice(host_data, dtype=np.float32):
93 """
94 Pass the host_data to device memory
95 """
96 if isinstance(host_data, list):
97 return _todevice(np.array(host_data, dtype=dtype))
98 elif is_numpy_tensor(host_data):
99 return _todevice(host_data)
100
101
102def device_mem_alloc(size):

Callers 4

argumentMethod · 0.90
__init__Method · 0.90
__init__Method · 0.90
host_precomputeMethod · 0.90

Calls 2

is_numpy_tensorFunction · 0.90
_todeviceFunction · 0.85

Tested by

no test coverage detected