You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mlir][tosa] Add the concept of a TOSA target environment (llvm#153771)
This commit introduces a new module-level attribute `tosa.target_env`.
It encapsulates target information for use during compilation such as:
level, profiles and extensions. For example:
```mlir
module attributes {tosa.target_env =
#tosa.target_env<level = none, profiles = [pro_int], extensions = [int16, int4]>} {
<my-tosa-program>
}
```
Previously the validation pass accepted target information as a series
of command line pass options. This commit changes the behaviour to query
the attached target environment from the module attribute. This
refactoring allows other passes to query the same target information.
A new target environment can be attached using the
`--tosa-attach-target` pass, which takes the same command line options
as the previous validation pass arguments. For example:
```bash
mlir-opt --tosa-attach-target="profiles=pro_int extensions=int4,int16 level=none" test.mlir
```
0 commit comments