fn
empty_op
→TensorImplPtrint empty_op(const int & shape, Dtype dt, Device device, bool requires_grad)Python wrappers
Public Python APIs implemented by this engine symbol.Create an uninitialised tensor of the given shape.
Parameters
shapeShapeDesired output shape.
dtDtypeElement dtype.
deviceDeviceTarget device.
requires_gradboolAttach a fresh autograd leaf when true.
Returns
TensorImplPtrLeaf tensor with unspecified content.
Notes
The current implementation zero-fills (via make_zero_storage) to
avoid UB on uninitialised reads. The empty name signals that
callers must not rely on the values — future implementations may
switch to a true uninitialised allocator.