warp.to_torch#
- warp.to_torch(a, requires_grad=None)[source]#
Convert a Warp array to a PyTorch tensor without copying the data.
The returned PyTorch tensor aliases the Warp array’s storage. Clone the tensor if PyTorch must retain those values after Warp may modify or zero the underlying array.
- Parameters:
- Returns:
The converted PyTorch tensor.
- Return type: