Skip to content

Commit

Permalink
Add TTOPInterface funcs for supportsCPUExecution + supportsOnlyCPUExe…
Browse files Browse the repository at this point in the history
…cution (#1310)
  • Loading branch information
vwellsTT authored Nov 18, 2024
1 parent 4ed0821 commit 82ffe2b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions include/ttmlir/Dialect/TTIR/IR/TTIROpsInterfaces.td
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ def TTIROpInterface : OpInterface<"TTIROp"> {
/*methodBody=*/"",
/*defaultImplementation=*/"return ::mlir::tt::getCurrentScopeDevice($_op);"
>,
InterfaceMethod<
/*desc=*/[{
Return whether op can be run on CPU.
}],
/*retTy=*/"bool",
/*methodName=*/"supportsCPUExecution",
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/"return false;"
>,
InterfaceMethod<
/*desc=*/[{
Return whether op must be run on CPU.
}],
/*retTy=*/"bool",
/*methodName=*/"supportsOnlyCPUExecution",
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/"return false;"
>,
];
}

Expand Down

0 comments on commit 82ffe2b

Please sign in to comment.