[FRONTEND] Fixed inliner and got more tests to pass (#822)

This adds a `DialectInlinerInterface` to the Triton dialect. This, along
with a few other minor semantic changes, fixes our tests on call
instructions. Also added the option to provide use an "LLVM_SYSPATH"
environment variable to link against locally build of LLVM; this was
useful for debugging this issue.
This commit is contained in:
Philippe Tillet
2022-10-30 14:10:02 -07:00
committed by GitHub
parent 71428194a1
commit e61dc75942
7 changed files with 192 additions and 155 deletions

View File

@@ -422,7 +422,12 @@ void init_triton_ir(py::module &&m) {
.def("get_int32_attr", &mlir::OpBuilder::getI32IntegerAttr)
// Use arith.ConstantOp to create constants
// // Constants
// .def("get_int1", &ir::builder::get_int1, ret::reference)
.def("get_int1",
[](mlir::OpBuilder &self, bool v) -> mlir::Value {
auto loc = self.getUnknownLoc();
return mlir::Value(self.create<mlir::arith::ConstantIntOp>(
loc, v, self.getI1Type()));
})
.def("get_int32",
[](mlir::OpBuilder &self, int64_t v) -> mlir::Value {
auto loc = self.getUnknownLoc();