llvm-project
3f091af9 - [mlir][tosa] Add a pass to downgrade TOSA `1.1.draft` to `1.0` (#194971)

Commit
6 days ago
[mlir][tosa] Add a pass to downgrade TOSA `1.1.draft` to `1.0` (#194971) This commit adds a pass that will allow 1.1.draft operations to be rewritten to their 1.0 counterparts where possible. The pass currently covers the following operations: - bool <-> fp32 casts via i8 bridge casts - bool gather/scatter with i32 indices via i8 payload rewrites Note that the downgrade is 'best-effort' and the pass does not perform any validation itself. The validation pass should be run after downgrading to check that the resulting IR was downgraded successfully. Motivation: This decouples the target specification version in legalizations and backends. Legalizations from higher level frameworks may be updated to support producing TOSA 1.1.draft variants of operations, while backends can still consume TOSA 1.0 IR after running the downgrade pass.
Author
Parents
Loading