Pass the host_data to device memory
(host_data, dtype=np.float32)
| 90 | |
| 91 | |
| 92 | def 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 | |
| 102 | def device_mem_alloc(size): |
no test coverage detected