Skip to content

Commit 3745f54

Browse files
dan-garveycathyzhyi
authored andcommitted
Update external/llvm-project
- Add `qualified` to ods because of https://reviews.llvm.org/D113873 and https://reviews.llvm.org/D116905 - Needed to revert #520 as it was based on an old torch version. #527 will bring this back with a better design. - Change ConvertAtenCatOp to use more accurate tensor shape info and as much static info as possible to pass `tensor.insert_slice` verification code added by https://reviews.llvm.org/D114715 - Other minor fixes
1 parent 40efd2c commit 3745f54

File tree

17 files changed

+332
-324
lines changed

17 files changed

+332
-324
lines changed

external/llvm-project

Submodule llvm-project updated 11054 files

include/torch-mlir/Dialect/Torch/IR/GeneratedAtenOps.td

Lines changed: 228 additions & 228 deletions
Large diffs are not rendered by default.

include/torch-mlir/Dialect/Torch/IR/GeneratedPrimOps.td

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def Torch_PrimLayoutOp : Torch_Op<"prim.layout", [
2727
let results = (outs
2828
Torch_IntType:$result
2929
);
30-
let assemblyFormat = "$a attr-dict `:` type($a) `->` type($result)";
30+
let assemblyFormat = "$a attr-dict `:` qualified(type($a)) `->` qualified(type($result))";
3131
}
3232

3333
def Torch_PrimTupleIndexOp : Torch_Op<"prim.TupleIndex", [
@@ -42,7 +42,7 @@ def Torch_PrimTupleIndexOp : Torch_Op<"prim.TupleIndex", [
4242
let results = (outs
4343
AnyTorchType:$result
4444
);
45-
let assemblyFormat = "$tup `,` $i attr-dict `:` type($tup) `,` type($i) `->` type($result)";
45+
let assemblyFormat = "$tup `,` $i attr-dict `:` qualified(type($tup)) `,` qualified(type($i)) `->` qualified(type($result))";
4646
let hasCanonicalizer = 1;
4747
}
4848

@@ -57,7 +57,7 @@ def Torch_PrimDeviceOp : Torch_Op<"prim.device", [
5757
let results = (outs
5858
Torch_DeviceType:$result
5959
);
60-
let assemblyFormat = "$a attr-dict `:` type($a) `->` type($result)";
60+
let assemblyFormat = "$a attr-dict `:` qualified(type($a)) `->` qualified(type($result))";
6161
}
6262

6363
def Torch_PrimDtypeOp : Torch_Op<"prim.dtype", [
@@ -71,7 +71,7 @@ def Torch_PrimDtypeOp : Torch_Op<"prim.dtype", [
7171
let results = (outs
7272
Torch_IntType:$result
7373
);
74-
let assemblyFormat = "$a attr-dict `:` type($a) `->` type($result)";
74+
let assemblyFormat = "$a attr-dict `:` qualified(type($a)) `->` qualified(type($result))";
7575
let hasFolder = 1;
7676
}
7777

@@ -85,7 +85,7 @@ def Torch_PrimTupleUnpackOp : Torch_Op<"prim.TupleUnpack", [
8585
let results = (outs
8686
Variadic<AnyTorchType>:$results
8787
);
88-
let assemblyFormat = "$tup attr-dict `:` type($tup) `->` type($results)";
88+
let assemblyFormat = "$tup attr-dict `:` qualified(type($tup)) `->` qualified(type($results))";
8989
let hasCanonicalizer = 1;
9090
}
9191

@@ -100,7 +100,7 @@ def Torch_PrimNumToTensorScalarOp : Torch_Op<"prim.NumToTensor.Scalar", [
100100
let results = (outs
101101
AnyTorchTensorType:$result
102102
);
103-
let assemblyFormat = "$a attr-dict `:` type($a) `->` type($result)";
103+
let assemblyFormat = "$a attr-dict `:` qualified(type($a)) `->` qualified(type($result))";
104104
}
105105

106106
def Torch_PrimMinSelfIntOp : Torch_Op<"prim.min.self_int", [
@@ -114,7 +114,7 @@ def Torch_PrimMinSelfIntOp : Torch_Op<"prim.min.self_int", [
114114
let results = (outs
115115
Torch_IntType:$result
116116
);
117-
let assemblyFormat = "$self attr-dict `:` type($self) `->` type($result)";
117+
let assemblyFormat = "$self attr-dict `:` qualified(type($self)) `->` qualified(type($result))";
118118
}
119119

120120
def Torch_PrimMinIntOp : Torch_Op<"prim.min.int", [
@@ -129,7 +129,7 @@ def Torch_PrimMinIntOp : Torch_Op<"prim.min.int", [
129129
let results = (outs
130130
Torch_IntType:$result
131131
);
132-
let assemblyFormat = "$a `,` $b attr-dict `:` type($a) `,` type($b) `->` type($result)";
132+
let assemblyFormat = "$a `,` $b attr-dict `:` qualified(type($a)) `,` qualified(type($b)) `->` qualified(type($result))";
133133
}
134134

135135
def Torch_PrimMaxSelfIntOp : Torch_Op<"prim.max.self_int", [
@@ -143,7 +143,7 @@ def Torch_PrimMaxSelfIntOp : Torch_Op<"prim.max.self_int", [
143143
let results = (outs
144144
Torch_IntType:$result
145145
);
146-
let assemblyFormat = "$self attr-dict `:` type($self) `->` type($result)";
146+
let assemblyFormat = "$self attr-dict `:` qualified(type($self)) `->` qualified(type($result))";
147147
}
148148

149149
def Torch_PrimMaxIntOp : Torch_Op<"prim.max.int", [
@@ -158,7 +158,7 @@ def Torch_PrimMaxIntOp : Torch_Op<"prim.max.int", [
158158
let results = (outs
159159
Torch_IntType:$result
160160
);
161-
let assemblyFormat = "$a `,` $b attr-dict `:` type($a) `,` type($b) `->` type($result)";
161+
let assemblyFormat = "$a `,` $b attr-dict `:` qualified(type($a)) `,` qualified(type($b)) `->` qualified(type($result))";
162162
}
163163

164164
def Torch_PrimRaiseExceptionOp : Torch_Op<"prim.RaiseException", [
@@ -171,7 +171,7 @@ def Torch_PrimRaiseExceptionOp : Torch_Op<"prim.RaiseException", [
171171
);
172172
let results = (outs
173173
);
174-
let assemblyFormat = "$msg attr-dict `:` type($msg)";
174+
let assemblyFormat = "$msg attr-dict `:` qualified(type($msg))";
175175
}
176176

177177
def Torch_PrimUninitializedOp : Torch_Op<"prim.Uninitialized", [
@@ -184,7 +184,7 @@ def Torch_PrimUninitializedOp : Torch_Op<"prim.Uninitialized", [
184184
let results = (outs
185185
AnyTorchType:$result
186186
);
187-
let assemblyFormat = " attr-dict `:` type($result)";
187+
let assemblyFormat = " attr-dict `:` qualified(type($result))";
188188
let hasCanonicalizer = 1;
189189
}
190190

@@ -199,7 +199,7 @@ def Torch_PrimUncheckedCastOp : Torch_Op<"prim.unchecked_cast", [
199199
let results = (outs
200200
AnyTorchType:$result
201201
);
202-
let assemblyFormat = "$x attr-dict `:` type($x) `->` type($result)";
202+
let assemblyFormat = "$x attr-dict `:` qualified(type($x)) `->` qualified(type($result))";
203203
}
204204

205205
def Torch_PrimPrintOp : Torch_Op<"prim.Print", [
@@ -211,7 +211,7 @@ def Torch_PrimPrintOp : Torch_Op<"prim.Print", [
211211
);
212212
let results = (outs
213213
);
214-
let assemblyFormat = "`(` $operands `)` attr-dict `:` type($operands)";
214+
let assemblyFormat = "`(` $operands `)` attr-dict `:` qualified(type($operands))";
215215
}
216216

217217
def Torch_PrimTolistOp : Torch_Op<"prim.tolist", [
@@ -224,6 +224,6 @@ def Torch_PrimTolistOp : Torch_Op<"prim.tolist", [
224224
let results = (outs
225225
Variadic<AnyTorchType>:$results
226226
);
227-
let assemblyFormat = "`(` $operands `)` attr-dict `:` type($operands) `->` type($results)";
227+
let assemblyFormat = "`(` $operands `)` attr-dict `:` qualified(type($operands)) `->` qualified(type($results))";
228228
}
229229

include/torch-mlir/Dialect/Torch/IR/GeneratedQuantizedOps.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ def Torch_QuantizedLinearOp : Torch_Op<"quantized.linear", [
3131
let results = (outs
3232
AnyTorchTensorType:$Y
3333
);
34-
let assemblyFormat = "$X `,` $W_prepack `,` $Y_scale_i `,` $Y_zero_point_i attr-dict `:` type($X) `,` type($W_prepack) `,` type($Y_scale_i) `,` type($Y_zero_point_i) `->` type($Y)";
34+
let assemblyFormat = "$X `,` $W_prepack `,` $Y_scale_i `,` $Y_zero_point_i attr-dict `:` qualified(type($X)) `,` qualified(type($W_prepack)) `,` qualified(type($Y_scale_i)) `,` qualified(type($Y_zero_point_i)) `->` qualified(type($Y))";
3535
}
3636

include/torch-mlir/Dialect/Torch/IR/TorchOps.td

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def Torch_NnModuleOp : Torch_Op<"nn_module", [
6464
let regions = (region SizedRegion<1>:$region);
6565
let verifier = "return ::verify(*this);";
6666

67-
let assemblyFormat = "$region attr-dict `:` type($result)";
67+
let assemblyFormat = "$region attr-dict `:` qualified(type($result))";
6868

6969
let extraClassDeclaration = [{
7070
StringRef getClassName() { return getType().getClassName(); }
@@ -97,7 +97,7 @@ def Torch_SlotOp : Torch_Op<"slot", [
9797
let results = (outs);
9898

9999
let assemblyFormat = [{
100-
$name `,` $value attr-dict `:` type($value)
100+
$name `,` $value attr-dict `:` qualified(type($value))
101101
}];
102102
}
103103

@@ -272,7 +272,7 @@ def Torch_GlobalSlotInitOp : Torch_Op<"global_slot.init", [
272272
// TODO: Have a SingleBlockExplicitTerminator trait.
273273
let builders = [OpBuilder<(ins), [{ /*nothing to do */ }]>];
274274

275-
let assemblyFormat = "$initialValue attr-dict `:` type($initialValue)";
275+
let assemblyFormat = "$initialValue attr-dict `:` qualified(type($initialValue))";
276276
}
277277

278278
def Torch_GlobalSlotGetOp : Torch_Op<"global_slot.get", []> {
@@ -284,7 +284,7 @@ def Torch_GlobalSlotGetOp : Torch_Op<"global_slot.get", []> {
284284
let results = (outs AnyTorchType:$result);
285285

286286
let assemblyFormat = [{
287-
$slot attr-dict `:` type($result)
287+
$slot attr-dict `:` qualified(type($result))
288288
}];
289289
}
290290

@@ -298,7 +298,7 @@ def Torch_GlobalSlotSetOp : Torch_Op<"global_slot.set", []> {
298298
let results = (outs);
299299

300300
let assemblyFormat = [{
301-
$slot `=` $value attr-dict `:` type($value)
301+
$slot `=` $value attr-dict `:` qualified(type($value))
302302
}];
303303
}
304304

@@ -319,7 +319,7 @@ def Torch_PrimListUnpackOp: Torch_Op<"prim.ListUnpack",
319319
let results = (outs Variadic<AnyTorchType>:$results);
320320

321321
let assemblyFormat = [{
322-
$operand attr-dict `:` type($operand) `->` type($results)
322+
$operand attr-dict `:` qualified(type($operand)) `->` qualified(type($results))
323323
}];
324324
}
325325

@@ -343,7 +343,7 @@ def Torch_PrimTupleConstructOp: Torch_Op<"prim.TupleConstruct", [
343343
);
344344

345345
let assemblyFormat = [{
346-
$elements attr-dict `:` type($elements) `->` type($result)
346+
$elements attr-dict `:` qualified(type($elements)) `->` qualified(type($result))
347347
}];
348348
}
349349

@@ -385,7 +385,7 @@ def Torch_PrimDictConstructOp: Torch_Op<"prim.DictConstruct", [
385385
let verifier = "return ::verify(*this);";
386386

387387
let assemblyFormat = [{
388-
`keys` `(` ($keys^ `:` type($keys))? `)` `values` `(` ($values^ `:` type($values))? `)` attr-dict `->` type($result)
388+
`keys` `(` ($keys^ `:` qualified(type($keys)))? `)` `values` `(` ($values^ `:` qualified(type($values)))? `)` attr-dict `->` qualified(type($result))
389389
}];
390390

391391
let extraClassDeclaration = [{
@@ -401,7 +401,7 @@ def Torch_PrimGetAttrOp : Torch_Op<"prim.GetAttr", []> {
401401
let results = (outs AnyTorchType:$result);
402402

403403
let assemblyFormat = [{
404-
$receiver `[` $name `]` attr-dict `:` type($receiver) `->` type($result)
404+
$receiver `[` $name `]` attr-dict `:` qualified(type($receiver)) `->` qualified(type($result))
405405
}];
406406
}
407407

@@ -416,7 +416,7 @@ def Torch_PrimSetAttrOp : Torch_Op<"prim.SetAttr", []> {
416416
let results = (outs);
417417

418418
let assemblyFormat = [{
419-
$receiver `[` $name `]` `=` $value attr-dict `:` type($receiver) `,` type($value)
419+
$receiver `[` $name `]` `=` $value attr-dict `:` qualified(type($receiver)) `,` qualified(type($value))
420420
}];
421421
}
422422

@@ -431,7 +431,7 @@ def Torch_PrimCallMethodOp : Torch_Op<"prim.CallMethod", []> {
431431
let results = (outs AnyTorchType:$result);
432432

433433
let assemblyFormat = [{
434-
$receiver `[` $name `]` `(` $operands `)` attr-dict `:` type($receiver) `,` functional-type($operands, $result)
434+
$receiver `[` $name `]` `(` $operands `)` attr-dict `:` qualified(type($receiver)) `,` functional-type($operands, $result)
435435
}];
436436
}
437437

@@ -478,7 +478,7 @@ def Torch_PrimLoopConditionOp : Torch_Op<"prim.Loop.condition", [
478478

479479
let assemblyFormat = [{
480480
$shouldContinue `,`
481-
`iter` `(` ($iterArgs^ `:` type($iterArgs))? `)` attr-dict
481+
`iter` `(` ($iterArgs^ `:` qualified(type($iterArgs)))? `)` attr-dict
482482
}];
483483
}
484484

@@ -525,7 +525,7 @@ def Torch_PrimIfYieldOp : Torch_Op<"prim.If.yield", [
525525
let results = (outs);
526526

527527
let assemblyFormat = [{
528-
attr-dict ($results^ `:` type($results))?
528+
attr-dict ($results^ `:` qualified(type($results)))?
529529
}];
530530
}
531531

@@ -662,7 +662,7 @@ def Torch_DerefineOp : Torch_Op<"derefine", [
662662
let results = (outs AnyTorchType:$result);
663663

664664
let assemblyFormat = [{
665-
$operand attr-dict `:` type($operand) `to` type($result)
665+
$operand attr-dict `:` qualified(type($operand)) `to` qualified(type($result))
666666
}];
667667
}
668668

@@ -698,7 +698,7 @@ def Torch_LinearParamsCreateOp : Torch_Op<"linear_params.create", [
698698
let results = (outs Torch_LinearParamsType:$result);
699699

700700
let assemblyFormat = [{
701-
$weight (`,` $bias^)? attr-dict `:` type($weight) (`,` type($bias)^)?
701+
$weight (`,` $bias^)? attr-dict `:` qualified(type($weight)) (`,` qualified(type($bias))^)?
702702
}];
703703
}
704704

@@ -727,7 +727,7 @@ def Torch_PerTensorAffineCreateOp : Torch_Op<"per_tensor_affine.create", [
727727

728728
let assemblyFormat = [{
729729
$int_repr `,` $scale `,` $offset attr-dict
730-
`:` type($int_repr) `,` type($scale) `,` type($offset) `->` type($result)
730+
`:` qualified(type($int_repr)) `,` qualified(type($scale)) `,` qualified(type($offset)) `->` qualified(type($result))
731731
}];
732732
}
733733

@@ -754,7 +754,7 @@ def Torch_NonValueTensorLiteralOp : Torch_Op<"tensor.literal", [
754754
let results = (outs Torch_NonValueTensorType:$result);
755755

756756
let assemblyFormat = [{
757-
`(` $value `)` attr-dict `:` type($result)
757+
`(` $value `)` attr-dict `:` qualified(type($result))
758758
}];
759759

760760
let extraClassDeclaration = [{
@@ -786,7 +786,7 @@ def Torch_ValueTensorLiteralOp : Torch_Op<"vtensor.literal", [
786786
let results = (outs Torch_ValueTensorType:$result);
787787

788788
let assemblyFormat = [{
789-
`(` $value `)` attr-dict `:` type($result)
789+
`(` $value `)` attr-dict `:` qualified(type($result))
790790
}];
791791

792792
let hasFolder = 1;
@@ -817,7 +817,7 @@ def Torch_TensorStaticInfoCastOp : Torch_Op<"tensor_static_info_cast", [
817817
AnyTorchTensorType:$result
818818
);
819819
let assemblyFormat = [{
820-
$operand attr-dict `:` type($operand) `to` type($result)
820+
$operand attr-dict `:` qualified(type($operand)) `to` qualified(type($result))
821821
}];
822822
let hasCanonicalizer = 1;
823823
}
@@ -849,7 +849,7 @@ def Torch_CopyToNonValueTensorOp : Torch_Op<"copy.to_tensor", [
849849
Torch_NonValueTensorType:$result
850850
);
851851
let assemblyFormat = [{
852-
$operand attr-dict `:` type($result)
852+
$operand attr-dict `:` qualified(type($result))
853853
}];
854854
let verifier = "return ::verify(*this);";
855855
}
@@ -879,7 +879,7 @@ def Torch_CopyToValueTensorOp : Torch_Op<"copy.to_vtensor", [
879879
Torch_ValueTensorType:$result
880880
);
881881
let assemblyFormat = [{
882-
$operand attr-dict `:` type($result)
882+
$operand attr-dict `:` qualified(type($result))
883883
}];
884884
let verifier = "return ::verify(*this);";
885885
}
@@ -908,7 +908,7 @@ def Torch_OverwriteTensorOp : Torch_Op<"overwrite.tensor", [
908908
);
909909
let assemblyFormat = [{
910910
$value `overwrites` $overwritten attr-dict
911-
`:` type($value) `,` type($overwritten)
911+
`:` qualified(type($value)) `,` qualified(type($overwritten))
912912
}];
913913
}
914914

include/torch-mlir/Dialect/TorchConversion/IR/TorchConversionOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def TorchConversion_ToBuiltinTensorOp : TorchConversion_Op<"to_builtin_tensor",
4040
AnyTensor:$result
4141
);
4242
let assemblyFormat = [{
43-
$operand attr-dict `:` type($operand) `->` type($result)
43+
$operand attr-dict `:` qualified(type($operand)) `->` qualified(type($result))
4444
}];
4545
}
4646

@@ -58,7 +58,7 @@ def TorchConversion_FromBuiltinTensorOp : TorchConversion_Op<"from_builtin_tenso
5858
Torch_ValueTensorType:$result
5959
);
6060
let assemblyFormat = [{
61-
$operand attr-dict `:` type($operand) `->` type($result)
61+
$operand attr-dict `:` qualified(type($operand)) `->` qualified(type($result))
6262
}];
6363
}
6464

0 commit comments

Comments
 (0)