Bump llvm-project to 6d263b6f1c97fe6c45c75443e7daf6cd0c1c4222

Changes:
- representation of arg attributes on functions changed
pull/214/head
Sean Silva 2021-05-10 18:05:06 -07:00
parent 133bdf4b31
commit 45ba5fac6c
2 changed files with 10 additions and 6 deletions

@ -1 +1 @@
Subproject commit 12011b5217929ef8a56c2099c6f3233934ea4fbc
Subproject commit 6d263b6f1c97fe6c45c75443e7daf6cd0c1c4222

View File

@ -37,14 +37,18 @@ MlirOperation torch_mlir::importJitFunctionAsFuncOp(
"func", loc, mlirRegionCreate(),
toMlirNamedAttribute("type", mlirTypeAttrGet(functionType)),
toMlirNamedAttribute("sym_name", symNameAttr));
std::vector<MlirAttribute> argAttrDicts;
for (int i = 0, e = mlirFunctionTypeGetNumInputs(functionType); i != e; i++) {
MlirAttribute argAttr = getArgAttribute(i);
if (mlirAttributeIsNull(argAttr)) {
continue;
MlirAttribute argAttrDict = getArgAttribute(i);
if (mlirAttributeIsNull(argAttrDict)) {
argAttrDicts.push_back(mlirDictionaryAttrGet(context, 0, nullptr));
} else {
argAttrDicts.push_back(argAttrDict);
}
mlirOperationSetAttributeByName(
func, toMlirStringRef("arg" + std::to_string(i)), argAttr);
}
mlirOperationSetAttributeByName(
func, toMlirStringRef("arg_attrs"),
mlirArrayAttrGet(context, argAttrDicts.size(), argAttrDicts.data()));
MlirRegion bodyRegion = mlirOperationGetRegion(func, 0);
std::vector<MlirType> resultTypes;
for (int i = 0, e = mlirFunctionTypeGetNumResults(functionType); i != e;