MCPcopy Create free account
hub / github.com/NVIDIA/DALI / create_tmp

Function create_tmp

dali/test/python/test_backend_impl_torch_dlpack.py:118–121  ·  view source on GitHub ↗
(idx)

Source from the content-addressed store, hash-verified

116
117def test_tensor_cpu_from_dlpack():
118 def create_tmp(idx):
119 a = np.full((4, 4), idx)
120 dlt = to_dlpack(torch.from_numpy(a))
121 return tensors.TensorCPU(dlt, "")
122
123 out = [create_tmp(i) for i in range(4)]
124 for i, t in enumerate(out):

Calls

no outgoing calls

Tested by

no test coverage detected