[BACKEND] Merge TT_ElementwisePureExtern and TT_ElementwiseImpureExtern (#2137)

Use getEffect instead to tell passes whether the op has side effects or
not. This doesn't change functionality otherwise.
This commit is contained in:
Thomas
2023-08-18 13:56:10 -07:00
committed by GitHub
parent bf351b9ba2
commit 23ef2615d2
6 changed files with 34 additions and 57 deletions

View File

@@ -1424,12 +1424,8 @@ void init_triton_ir(py::module &&m) {
const std::string &libPath, const std::string &symbol,
std::vector<mlir::Value> &argList, mlir::Type retType,
bool isPure) -> mlir::Value {
if (isPure)
return self.create<mlir::triton::PureExternElementwiseOp>(
retType, argList, libName, libPath, symbol);
else
return self.create<mlir::triton::ImpureExternElementwiseOp>(
retType, argList, libName, libPath, symbol);
return self.create<mlir::triton::ExternElementwiseOp>(
retType, argList, libName, libPath, symbol, isPure);
})
// Built-in instruction
.def("create_get_program_id",