[FRONTEND][BACKEND] Small fixes to multiple_of, num_programs, axisinfo; enable block-sparse tests (#927)
This commit is contained in:
@@ -187,6 +187,7 @@ void init_triton_ir(py::module &&m) {
|
||||
/* issue a warning */
|
||||
}
|
||||
})
|
||||
.def("get_context", &mlir::Value::getContext)
|
||||
.def("replace_all_uses_with",
|
||||
[](mlir::Value &self, mlir::Value &newValue) {
|
||||
self.replaceAllUsesWith(newValue);
|
||||
@@ -335,6 +336,16 @@ void init_triton_ir(py::module &&m) {
|
||||
return funcs[0];
|
||||
});
|
||||
|
||||
m.def("make_attr",
|
||||
[](const std::vector<int> &values, mlir::MLIRContext &context) {
|
||||
return mlir::DenseIntElementsAttr::get(
|
||||
mlir::RankedTensorType::get(
|
||||
{static_cast<int64_t>(values.size())},
|
||||
mlir::IntegerType::get(&context, 32)),
|
||||
values)
|
||||
.cast<mlir::Attribute>();
|
||||
});
|
||||
|
||||
m.def(
|
||||
"parse_mlir_module",
|
||||
[](const std::string &inputFilename, mlir::MLIRContext &context) {
|
||||
|
Reference in New Issue
Block a user