@@ -7613,6 +7613,56 @@ StringRef mlir::torch::Torch::getAbstractInterpLibrary() {
7613
7613
" %15 = torch.aten.append.t %6, %14 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
7614
7614
" return %6 : !torch.list<int>\n"
7615
7615
" }\n"
7616
+ " func.func @\"__torch_mlir_shape_fn.aten.pixel_unshuffle\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
7617
+ " %int1 = torch.constant.int 1\n"
7618
+ " %int-3 = torch.constant.int -3\n"
7619
+ " %str = torch.constant.str \"AssertionError: width must be divisible by downscale_factor in pixel_unshuffle\"\n"
7620
+ " %int-1 = torch.constant.int -1\n"
7621
+ " %str_0 = torch.constant.str \"AssertionError: height must be divisible by downscale_factor in pixel_unshuffle\"\n"
7622
+ " %int-2 = torch.constant.int -2\n"
7623
+ " %none = torch.constant.none\n"
7624
+ " %str_1 = torch.constant.str \"AssertionError: input must be at least rank-3 in pixel_unshuffle\"\n"
7625
+ " %int3 = torch.constant.int 3\n"
7626
+ " %int0 = torch.constant.int 0\n"
7627
+ " %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
7628
+ " %1 = torch.aten.ge.int %0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
7629
+ " torch.prim.If %1 -> () {\n"
7630
+ " torch.prim.If.yield\n"
7631
+ " } else {\n"
7632
+ " torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
7633
+ " torch.prim.If.yield\n"
7634
+ " }\n"
7635
+ " %2 = torch.aten.mul.int %arg1, %arg1 : !torch.int, !torch.int -> !torch.int\n"
7636
+ " %3 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
7637
+ " %4 = torch.aten.remainder.int %3, %arg1 : !torch.int, !torch.int -> !torch.int\n"
7638
+ " %5 = torch.aten.eq.int %4, %int0 : !torch.int, !torch.int -> !torch.bool\n"
7639
+ " torch.prim.If %5 -> () {\n"
7640
+ " torch.prim.If.yield\n"
7641
+ " } else {\n"
7642
+ " torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
7643
+ " torch.prim.If.yield\n"
7644
+ " }\n"
7645
+ " %6 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
7646
+ " %7 = torch.aten.remainder.int %6, %arg1 : !torch.int, !torch.int -> !torch.int\n"
7647
+ " %8 = torch.aten.eq.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
7648
+ " torch.prim.If %8 -> () {\n"
7649
+ " torch.prim.If.yield\n"
7650
+ " } else {\n"
7651
+ " torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
7652
+ " torch.prim.If.yield\n"
7653
+ " }\n"
7654
+ " %9 = torch.aten.slice.t %arg0, %int0, %int-3, %int1 : !torch.list<int>, !torch.int, !torch.int, !torch.int -> !torch.list<int>\n"
7655
+ " %10 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
7656
+ " %11 = torch.aten.mul.int %10, %2 : !torch.int, !torch.int -> !torch.int\n"
7657
+ " %12 = torch.aten.append.t %9, %11 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
7658
+ " %13 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
7659
+ " %14 = torch.aten.floordiv.int %13, %arg1 : !torch.int, !torch.int -> !torch.int\n"
7660
+ " %15 = torch.aten.append.t %9, %14 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
7661
+ " %16 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
7662
+ " %17 = torch.aten.floordiv.int %16, %arg1 : !torch.int, !torch.int -> !torch.int\n"
7663
+ " %18 = torch.aten.append.t %9, %17 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
7664
+ " return %9 : !torch.list<int>\n"
7665
+ " }\n"
7616
7666
" func.func @\"__torch_mlir_shape_fn.aten.channel_shuffle\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
7617
7667
" %none = torch.constant.none\n"
7618
7668
" %str = torch.constant.str \"AssertionError: input must be at least rank-3 in channel_shuffle\"\n"
@@ -12380,6 +12430,10 @@ StringRef mlir::torch::Torch::getAbstractInterpLibrary() {
12380
12430
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
12381
12431
" return %0#1 : !torch.int\n"
12382
12432
" }\n"
12433
+ " func.func @\"__torch_mlir_dtype_fn.aten.pixel_unshuffle\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
12434
+ " %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
12435
+ " return %0#1 : !torch.int\n"
12436
+ " }\n"
12383
12437
" func.func @\"__torch_mlir_dtype_fn.aten.channel_shuffle\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
12384
12438
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
12385
12439
" return %0#1 : !torch.int\n"
0 commit comments