mirror of https://github.com/llvm/torch-mlir
Bump llvm-project to 6d263b6f1c97fe6c45c75443e7daf6cd0c1c4222
Changes: - representation of arg attributes on functions changedpull/214/head
parent
133bdf4b31
commit
45ba5fac6c
|
@ -1 +1 @@
|
|||
Subproject commit 12011b5217929ef8a56c2099c6f3233934ea4fbc
|
||||
Subproject commit 6d263b6f1c97fe6c45c75443e7daf6cd0c1c4222
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue