now kernel functions return nothing (instead of none)

This commit is contained in:
Yan Da
2022-04-07 20:22:17 +08:00
parent 040a2b6c75
commit 62f772123c
3 changed files with 13 additions and 4 deletions

View File

@@ -964,6 +964,11 @@ void init_triton_ir(py::module &&m) {
})
// .def("create_int_cast", &ir::builder::create_int_cast)
// .def("create_downcast", &ir::builder::create_downcast)
.def("create_to_index", [](mlir::OpBuilder &self, mlir::Value &input) -> mlir::Value {
auto loc = self.getUnknownLoc();
return self.create<mlir::arith::IndexCastOp>(loc, input, self.getIndexType());
})
.def("create_fmul", [](mlir::OpBuilder &self, mlir::Value &lhs, mlir::Value &rhs) -> mlir::Value {
auto loc = self.getUnknownLoc();
return self.create<mlir::arith::MulFOp>(loc, lhs, rhs);