Skip to main content

Module ops

Module ops 

Source
Expand description

The autograd computation-graph node type Op and its op-kind enums.

Note on scalars: in the old design op scalars were typed T (tied to the tensor’s element type). Here a Float tensor’s precision is a runtime DType, so all op scalars are stored as f64 — the widest float — and cast back to the tensor’s actual precision when the op runs or its gradient is computed.

Re-exports§

pub use construct::DEFAULT_FLOAT;
pub use construct::DEFAULT_INT;

Modules§

construct

Structs§

Slice
A slice range with start, optional end (negative = from end, None = to end), and step.

Enums§

BinaryOp
CmpOp
FloatUnaryOp
Indexer
One element of a fancy-indexing operation.
Op
A node in the (implicit) computation graph: the operation that produced a Float tensor, holding Arc references to its inputs. Only Float tensors record ops — Int/Bool tensors are never differentiated.
ReduceOp
UnaryOp
ViewOp
A view operation: it shares the source tensor’s storage under a new [Layout] without touching device kernels.

Traits§

IndexOp
Trait for fancy indexing via the .i() method.
IndexingDTypeKind
NumericDTypeKind
ReduceDTypeKind
ShapeDTypeKind
TransferDTypeKind
Kind-level dispatch for Tensor::to_device.