How TVM Unity Unifies Symbolic Shapes Across Abstraction Layers
TVM Unity, particularly through its Relax IR, achieves a 'unified flow' by implementing first-class symbolic shape support across all abstraction layers. This means dynamic dimensions (e.g., `n`, `m`) are globally tracked from high-level computational graphs down to low-level TensorIR and hardware primitives, enabling seamless information exchange and cross-layer interactions for advanced optimizations.
The top 3
- Relax IR: Dynamic Shape Breakthrough: Relax, TVM Unity's next-generation IR, introduces first-class symbolic shape support, precisely tracking dynamic dimensions (e.g., batch size 'm') at compile time and overcoming Relay's limitations of 'Any' dimensions.
- TVM Unity's Cross-Layer Shape Flow: TVM Unity enables symbolic shape dimensions to flow seamlessly across computational graph, tensor program, and external library abstraction layers, allowing global tracking and analysis of shape relations for comprehensive optimization.
- Optimizing Dynamic LLM Workloads: The unification of symbolic shapes in TVM Unity facilitates crucial cross-layer optimizations like dynamic shape-aware operator fusion, efficient memory planning, and tensor program workspace lifting, significantly boosting performance for dynamic ML models.
Sources
Open the full topic