Skip to content

Commit 208a192

Browse files
committed
resolve merge conflicts
1 parent 020b687 commit 208a192

File tree

2 files changed

+54
-3
lines changed

2 files changed

+54
-3
lines changed

lib/Dialect/Torch/Transforms/AbstractInterpLibrary.cpp

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7613,6 +7613,56 @@ StringRef mlir::torch::Torch::getAbstractInterpLibrary() {
76137613
" %15 = torch.aten.append.t %6, %14 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
76147614
" return %6 : !torch.list<int>\n"
76157615
" }\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"
76167666
" func.func @\"__torch_mlir_shape_fn.aten.channel_shuffle\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
76177667
" %none = torch.constant.none\n"
76187668
" %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() {
1238012430
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
1238112431
" return %0#1 : !torch.int\n"
1238212432
" }\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"
1238312437
" func.func @\"__torch_mlir_dtype_fn.aten.channel_shuffle\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
1238412438
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
1238512439
" return %0#1 : !torch.int\n"

test/Dialect/Torch/decompose-complex-ops.mlir

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,6 @@ func.func @pixel_unshuffle_fulldynamic(%arg0: !torch.vtensor<[?,?,?,?],f32>) ->
901901
%0 = torch.aten.pixel_unshuffle %arg0, %int2 : !torch.vtensor<[?,?,?,?],f32>, !torch.int -> !torch.vtensor<[?,?,?,?],f32>
902902
return %0 : !torch.vtensor<[?,?,?,?],f32>
903903
}
904-
<<<<<<< HEAD
905904

906905

907906
// -----
@@ -923,5 +922,3 @@ func.func @channel_shuffle(%arg0: !torch.vtensor<[1,8,4,4],f32>) -> !torch.vtens
923922
%0 = torch.aten.channel_shuffle %arg0, %int4 : !torch.vtensor<[1,8,4,4],f32>, !torch.int -> !torch.vtensor<[1,8,4,4],f32>
924923
return %0 : !torch.vtensor<[1,8,4,4],f32>
925924
}
926-
=======
927-
>>>>>>> c4143561 (add pixel_unshuffle_fulldynamic test)

0 commit comments

Comments
 (0)