Supported Operations
This page lists the PyTorch operations that Torch-Spyre supports via
torch.compile. Operations are grouped by category.
For details on how operations are implemented and how to add new ones, see Adding Operations.
Operations Table
Operation |
Eager |
Compiled |
Execution |
Notes |
|---|---|---|---|---|
Matrix Operations |
||||
|
Y |
Y |
Spyre |
|
|
Y |
Spyre |
||
|
Y |
Y |
Spyre |
Decomposed to |
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
Decomposed to |
Activation Functions |
||||
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
Custom decomposition |
|
Y |
Y |
Spyre |
Custom decomposition |
|
Y |
Spyre |
Custom op + lowering |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
Custom op + lowering |
|
Y |
Y |
Spyre |
|
|
Y |
Spyre |
Custom decomposition (math path); compiled only |
|
Pointwise Unary |
||||
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Spyre |
Custom decomposition |
|
|
Y |
Spyre |
Custom decomposition |
|
|
Y |
Y |
Spyre |
Custom decomposition |
|
Y |
Y |
Spyre |
Custom decomposition |
|
Y |
Y |
Spyre |
Custom op + lowering |
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
Eager via |
Pointwise Binary |
||||
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Spyre |
Custom decomposition |
|
|
Y |
Spyre |
Compiled only |
|
Comparison |
||||
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Spyre |
||
Reduction |
||||
|
Y |
Y |
Spyre |
|
|
Y |
Y |
Spyre |
|
|
Y |
Spyre |
Compiled only (no eager dispatch) |
|
|
Y |
Spyre |
Compiled only (no eager dispatch) |
|
|
Y |
Spyre |
Compiled only; |
|
|
Y |
Spyre |
Compiled only; |
|
|
Y |
Spyre |
Custom decomposition + custom ops ( |
|
|
Y |
Spyre |
Eager only; compiled support not validated |
|
View Ops [1] |
||||
|
Y |
Spyre |
Includes |
|
|
Y |
Spyre |
||
|
Y |
Y |
Spyre |
View op |
|
Y |
Y |
Spyre |
|
|
Y |
Spyre |
Compiled-tested as |
|
|
Y |
Spyre |
Compiled only |
|
|
Y |
Spyre |
Partial; some shapes trigger internal recompile |
|
|
Y |
Spyre |
Partial; some shapes trigger internal recompile |
|
|
Y |
Spyre |
Compiled only (lowers via |
|
|
Y |
Y |
Spyre |
|
|
Y |
Spyre |
Eager only |
|
|
Y |
Spyre |
Eager only |
|
|
Y |
Spyre |
Compiled only (lowers via |
|
|
Y |
Spyre |
Compiled only; supported when followed by a materializing op (e.g. |
|
|
Y |
Spyre |
Compiled only; basic slicing works (see |
|
Tensor Creation |
||||
|
Y |
Y |
Spyre |
Custom decomposition |
|
Y |
Y |
Spyre |
Custom decomposition |
|
Y |
Y |
Spyre |
Eager via |
|
Y |
Y |
Spyre |
Custom decomposition |
|
Y |
Spyre |
Custom decomposition |
|
Utility |
||||
|
Y |
Y |
Spyre |
Copies to CPU, returns Python scalar |
CPU Fallback |
||||
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
|
Y |
Y |
CPU fallback |
Runs on CPU, result transferred back |
Column key:
Eager — supported when running operations directly on a Spyre tensor without
torch.compile. Eager ops are registered viatorch_spyre/ops/eager.py,torch_spyre/ops/fallbacks.pyand select decompositions.Compiled — supported when using
torch.compile(model, backend="spyre").Execution — whether the op runs natively on the Spyre accelerator or falls back to CPU. CPU fallback ops are automatically handled by the compiler — a warning is emitted when fallback occurs.
View ops have partial support: some shapes and dimension combinations may trigger internal recompilation or are not yet implemented (e.g.,
expand,narrow). This is an active area of development.This table reflects the operations validated in the torch-spyre test suite (
tests/inductor/test_inductor_ops.py). Coverage grows continuously — check the test suite for the latest state.
Unsupported Operations
Operations not listed above will either:
Fall back to CPU — if Inductor cannot lower the op to a Spyre kernel, it falls back to CPU execution. A warning is emitted.
Raise a compile-time error — if the op produces a tensor layout that is incompatible with downstream Spyre ops.
To request support for a new operation or to contribute one yourself, see Adding Operations.