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 envrionment
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 infomation 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 atached 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
```
Change-Id: I74a254855f6320dc70b29ae3509997764e3e5d95
0 commit comments