warp.to_paddle#
- warp.to_paddle(a, requires_grad=None)[source]#
Convert a Warp array to a Paddle tensor without copying the data.
- Parameters:
a (warp.array) – The Warp array to convert.
requires_grad (bool | None) – Whether the resulting tensor should convert the array’s gradient, if it exists, to a grad tensor. Defaults to the array’s
requires_gradvalue.
- Returns:
The converted tensor.
- Return type:
paddle.Tensor