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
Update include/ttmlir/Dialect/TTIR/IR/TTIROpsInterfaces.td, update op interface def TTIROpInterface to include 2 new op interface methods:
bool supportsCPUExecution();: Denotes that this op can use the CPU for execution
bool supportsOnlyCPUExecution();: Denotes that this op must use the CPU for execution
Both should default return false, individual ops will have to override them to return true. If they return true, it can be asserted that there exists a dialect conversion for this TTIR op into a CPU compatible dialect.
The text was updated successfully, but these errors were encountered:
@sdjordjevicTT, in the doc we said these should be traits, do you have any preference if they have dedicated traits vs just being boolean queries on TTIROpInterface?
@sdjordjevicTT, in the doc we said these should be traits, do you have any preference if they have dedicated traits vs just being boolean queries on TTIROpInterface?
Sound good and makes sense as each op can override it through interface methods, hence we are getting the same behaviour.
The only thing I was thinking is that presumably we will have a dialect conversion that does TTIRToTOSA or something, then there is just kind of an implicit contract that if supportsCPUExecution returns true there must be a conversion path for it. That said, it might not be a big deal, and there might be cases where we want to selectively disable supportsCPUExecution despite there being a tosa conversion for it. I'm probably overthinking it 😅
Update
include/ttmlir/Dialect/TTIR/IR/TTIROpsInterfaces.td
, update op interfacedef TTIROpInterface
to include 2 new op interface methods:bool supportsCPUExecution();
: Denotes that this op can use the CPU for executionbool supportsOnlyCPUExecution();
: Denotes that this op must use the CPU for executionBoth should default return false, individual ops will have to override them to return true. If they return true, it can be asserted that there exists a dialect conversion for this TTIR op into a CPU compatible dialect.
The text was updated successfully, but these errors were encountered: