warp.clone#
- warp.clone(src, device=None, requires_grad=None, pinned=None)[source]#
Clone an existing array, allocates a copy of the src memory
- Parameters:
src (array) – The source array to copy
device (Device | str | None) – The device where the new array will be created (defaults to src.device)
requires_grad (bool | None) – Whether the array will be tracked for back propagation
pinned (bool | None) – Whether the array uses pinned host memory (only applicable to CPU arrays)
- Returns:
A warp.array object representing the allocation
- Return type: