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§
Structs§
- Slice
- A slice range with
start, optionalend(negative = from end,None= to end), andstep.
Enums§
- Binary
Op - CmpOp
- Float
Unary Op - Indexer
- One element of a fancy-indexing operation.
- Op
- A node in the (implicit) computation graph: the operation that produced a
Floattensor, holdingArcreferences to its inputs. OnlyFloattensors record ops —Int/Booltensors are never differentiated. - Reduce
Op - 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. - IndexingD
Type Kind - NumericD
Type Kind - ReduceD
Type Kind - ShapeD
Type Kind - TransferD
Type Kind - Kind-level dispatch for
Tensor::to_device.