Lines Matching full:as_tensor
247 """torch.as_tensor() and torch.tensor() supports the __cuda_array_interface__ protocol.
249 If an object exposes the __cuda_array_interface__, .as_tensor() and .tensor()
278 # Zero-copy when using `torch.as_tensor()`
281 torch_ary = torch.as_tensor(numba_ary, device="cuda")
299 torch_ary = torch.as_tensor(numba_ary, device="cpu")
329 """torch.as_tensor(numba_ary) should have correct inferred (contiguous) strides"""
346 torch_ary = torch.as_tensor(numba_ary, device="cuda")
356 …"""torch.as_tensor(obj) tensor grabs a reference to obj so that the lifetime of obj exceeds the te…
358 torch_ary = torch.as_tensor(numba_ary, device="cuda")
375 """torch.as_tensor() tensor device must match active numba context."""
379 torch_ary = torch.as_tensor(numba_ary, device="cuda")
387 torch_ary = torch.as_tensor(numba_ary, device=torch.device("cuda", 1))