mirror of https://github.com/llvm/torch-mlir
15344 lines
914 KiB
C++
15344 lines
914 KiB
C++
//===-------------------------------------------------------------*- C++-*-===//
|
|
//
|
|
// This file is licensed under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
// Also available under a BSD-style license. See LICENSE.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file is auto-generated! Do not edit!!!
|
|
// Generated with the script `build_tools/update_abstract_interp_lib.sh`.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "torch-mlir/Dialect/Torch/Transforms/Passes.h"
|
|
|
|
using namespace mlir;
|
|
|
|
StringRef mlir::torch::Torch::getAbstractInterpLibrary() {
|
|
#if defined(__clang__)
|
|
#pragma clang diagnostic push
|
|
#pragma clang diagnostic ignored "-Woverlength-strings"
|
|
#endif
|
|
// clang-format off
|
|
return "module {\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.unary(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %1, %true, init() {\n"
|
|
" ^bb0(%arg1: !torch.int):\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.append.t %0, %2 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions._copy(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %1, %true, init() {\n"
|
|
" ^bb0(%arg1: !torch.int):\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.append.t %0, %2 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.adaptive_avg_pool2d(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %12 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %13 = torch.aten.eq.int %12, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %13 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.__range_length %int1, %5, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %6, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %12 = torch.aten.__derive_index %arg2, %int1, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %12 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ne.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %8 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %8, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.__range_length %int0, %9, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %10, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %12 = torch.aten.__derive_index %arg2, %int0, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %12 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.append.t %7, %13 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %11 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %11, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %12 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.append.t %7, %12 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.zero_dim_tensor(%arg0: !torch.any) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.arange_end(%arg0: !torch.union<float, int>, %arg1: !torch.any, %arg2: !torch.any, %arg3: !torch.any, %arg4: !torch.any) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.operator \"aten.ge\"(%arg0, %int0) : (!torch.union<float, int>, !torch.int) -> !torch.bool \n"
|
|
" torch.prim.If %0 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %1 = torch.aten.ceil.Scalar %arg0 : !torch.union<float, int> -> !torch.number\n"
|
|
" %2 = torch.aten.Int.Scalar %1 : !torch.number -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %2 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.arange_start(%arg0: !torch.union<float, int>, %arg1: !torch.union<float, int>, %arg2: !torch.any, %arg3: !torch.any, %arg4: !torch.any, %arg5: !torch.any) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.operator \"aten.ge\"(%arg1, %int0) : (!torch.union<float, int>, !torch.int) -> !torch.bool \n"
|
|
" torch.prim.If %0 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %1 = torch.operator \"aten.ge\"(%arg1, %arg0) : (!torch.union<float, int>, !torch.union<float, int>) -> !torch.bool \n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.sub %arg1, %arg0 : !torch.union<float, int>, !torch.union<float, int> -> !torch.number\n"
|
|
" %3 = torch.aten.ceil.Scalar %2 : !torch.number -> !torch.number\n"
|
|
" %4 = torch.aten.Int.Scalar %3 : !torch.number -> !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct %4 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.arange_start_step(%arg0: !torch.union<float, int>, %arg1: !torch.union<float, int>, %arg2: !torch.union<float, int>, %arg3: !torch.any, %arg4: !torch.any, %arg5: !torch.any, %arg6: !torch.any) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.operator \"aten.ne\"(%arg2, %int0) : (!torch.union<float, int>, !torch.int) -> !torch.bool \n"
|
|
" torch.prim.If %0 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %1 = torch.operator \"aten.lt\"(%arg2, %int0) : (!torch.union<float, int>, !torch.int) -> !torch.bool \n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" %6 = torch.operator \"aten.ge\"(%arg0, %arg1) : (!torch.union<float, int>, !torch.union<float, int>) -> !torch.bool \n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %6 = torch.operator \"aten.ge\"(%arg1, %arg0) : (!torch.union<float, int>, !torch.union<float, int>) -> !torch.bool \n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.sub %arg1, %arg0 : !torch.union<float, int>, !torch.union<float, int> -> !torch.number\n"
|
|
" %3 = torch.aten.div %2, %arg2 : !torch.number, !torch.union<float, int> -> !torch.float\n"
|
|
" %4 = torch.aten.ceil.float %3 : !torch.float -> !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct %4 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.squeeze_nodim(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %1, %true, init() {\n"
|
|
" ^bb0(%arg1: !torch.int):\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.ne.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.append.t %0, %4 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.squeeze(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.le.int %1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %1 : !torch.int\n"
|
|
" }\n"
|
|
" %4 = torch.aten.neg.int %3 : !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.lt.int %arg1, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %12 = torch.aten.gt.int %arg1, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" %12 = torch.aten.add.int %arg1, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %12 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %11 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %11, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %12 = torch.aten.eq.int %arg2, %10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ne.int %13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.append.t %0, %15 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.append.t %0, %13 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.maybe_wrap_dim(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.le.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If %arg2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %2 = torch.aten.neg.int %1 : !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.lt.int %arg0, %2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.gt.int %arg0, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %9 : !torch.bool\n"
|
|
" }\n"
|
|
" %6 = torch.aten.__not__ %5 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.lt.int %arg0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.int) {\n"
|
|
" %9 = torch.aten.add.int %arg0, %1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg0 : !torch.int\n"
|
|
" }\n"
|
|
" return %8 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.squeeze_dims(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.list<int>) {\n"
|
|
" torch.prim.If.yield %arg0 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %4 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %4, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %8 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.append.t %3, %8 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %5 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %5, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %8 = torch.aten.__getitem__.t %3, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.aten.le.int %9, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" }\n"
|
|
" %12 = torch.aten.neg.int %11 : !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.sub.int %11, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.lt.int %8, %12 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %20 = torch.aten.gt.int %8, %13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" }\n"
|
|
" %16 = torch.aten.__not__ %15 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.lt.int %8, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.add.int %8, %11 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %8 : !torch.int\n"
|
|
" }\n"
|
|
" %19 = torch.aten._set_item.t %3, %arg2, %18 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %6 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %7 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %7, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %8 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.eq.int %8, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %9 -> () {\n"
|
|
" %10 = torch.aten.__contains__.int_list %3, %arg2 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.aten.__not__ %10 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.append.t %6, %12 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %10 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.append.t %6, %10 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.unsqueeze(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.add.int %0, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.le.int %1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %1 : !torch.int\n"
|
|
" }\n"
|
|
" %4 = torch.aten.neg.int %3 : !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.lt.int %arg1, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.gt.int %arg1, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %13 : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" %13 = torch.aten.add.int %arg1, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %11 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %12 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %12, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.append.t %11, %13 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.aten.insert.t %11, %10, %int1 : !torch.list<int>, !torch.int, !torch.int\n"
|
|
" return %11 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.slice(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.int) -> !torch.list<int> {\n"
|
|
" %int9223372036854775807 = torch.constant.int 9223372036854775807\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.le.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" %4 = torch.aten.neg.int %3 : !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.lt.int %arg1, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %33 = torch.aten.gt.int %arg1, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %33 : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" %33 = torch.aten.add.int %arg1, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %33 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %11 = torch.aten.__isnot__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.int) {\n"
|
|
" %33 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %33 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" %13 = torch.aten.__isnot__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.int) {\n"
|
|
" %33 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %33 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int9223372036854775807 : !torch.int\n"
|
|
" }\n"
|
|
" %15 = torch.aten.gt.int %arg4, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.aten.eq.int %12, %int9223372036854775807 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %12 : !torch.int\n"
|
|
" }\n"
|
|
" %18 = torch.aten.lt.int %17, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.int) {\n"
|
|
" %33 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.add.int %17, %33 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %34 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %17 : !torch.int\n"
|
|
" }\n"
|
|
" %20 = torch.aten.lt.int %14, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %21 = torch.prim.If %20 -> (!torch.int) {\n"
|
|
" %33 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.add.int %14, %33 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %34 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" }\n"
|
|
" %22 = torch.aten.lt.int %19, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" } else {\n"
|
|
" %33 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.gt.int %19, %33 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %35 = torch.prim.If %34 -> (!torch.int) {\n"
|
|
" %36 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %36 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %19 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %35 : !torch.int\n"
|
|
" }\n"
|
|
" %24 = torch.aten.lt.int %21, %23 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %25 = torch.prim.If %24 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %23 : !torch.int\n"
|
|
" } else {\n"
|
|
" %33 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.ge.int %21, %33 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %35 = torch.prim.If %34 -> (!torch.int) {\n"
|
|
" %36 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %36 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %21 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %35 : !torch.int\n"
|
|
" }\n"
|
|
" %26 = torch.aten.sub.int %25, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %27 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %28 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %28, %true, init() {\n"
|
|
" ^bb0(%arg5: !torch.int):\n"
|
|
" %33 = torch.aten.__getitem__.t %arg0, %arg5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.append.t %27, %33 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %29 = torch.aten.add.int %26, %arg4 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.sub.int %29, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %31 = torch.aten.floordiv.int %30, %arg4 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten._set_item.t %27, %10, %31 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" return %27 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.max_int() -> !torch.int {\n"
|
|
" %int9223372036854775807 = torch.constant.int 9223372036854775807\n"
|
|
" return %int9223372036854775807 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.select(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.le.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" %4 = torch.aten.neg.int %3 : !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.lt.int %arg1, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %17 = torch.aten.gt.int %arg1, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %17 : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" %17 = torch.aten.add.int %arg1, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %17 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %11 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.neg.int %11 : !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.lt.int %arg2, %12 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %17 = torch.aten.ge.int %arg2, %11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %17 : !torch.bool\n"
|
|
" }\n"
|
|
" %15 = torch.aten.__not__ %14 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %0, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %17 = torch.aten.ne.int %arg3, %10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %17 -> () {\n"
|
|
" %18 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.append.t %16, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %16 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.index_select(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.le.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" %3 = torch.aten.neg.int %2 : !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.sub.int %2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.lt.int %arg1, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %18 = torch.aten.gt.int %arg1, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %18 : !torch.bool\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" %18 = torch.aten.add.int %arg1, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %18 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %10 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %11 = torch.prim.Loop %10, %true, init(%int1) {\n"
|
|
" ^bb0(%arg3: !torch.int, %arg4: !torch.int):\n"
|
|
" %18 = torch.aten.__getitem__.t %arg2, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.mul.int %arg4, %18 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%19 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %12 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %13 = torch.aten.le.int %12, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %13 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %14 = torch.aten.eq.int %9, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %18 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %19 = torch.aten.lt.int %9, %18 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %17 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %17, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %18 = torch.aten.eq.int %9, %arg3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" %19 = torch.aten.append.t %16, %11 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.append.t %16, %19 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %16 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.multiply_integers(%arg0: !torch.list<int>) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.Loop %0, %true, init(%int1) {\n"
|
|
" ^bb0(%arg1: !torch.int, %arg2: !torch.int):\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.mul.int %arg2, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%3 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.embedding(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.bool, %arg4: !torch.bool) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.list<int>) {\n"
|
|
" %5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.le.int %5, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" %8 = torch.aten.neg.int %7 : !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %7, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.lt.int %int0, %8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %19 = torch.aten.gt.int %int0, %9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" }\n"
|
|
" %12 = torch.aten.__not__ %11 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %14 = torch.prim.Loop %13, %true, init(%int1) {\n"
|
|
" ^bb0(%arg5: !torch.int, %arg6: !torch.int):\n"
|
|
" %19 = torch.aten.__getitem__.t %arg1, %arg5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.mul.int %arg6, %19 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%20 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %15 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %16 = torch.aten.le.int %15, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %18 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %18, %true, init() {\n"
|
|
" ^bb0(%arg5: !torch.int):\n"
|
|
" %19 = torch.aten.eq.int %int0, %arg5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %19 -> () {\n"
|
|
" %20 = torch.aten.append.t %17, %14 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %arg5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.append.t %17, %20 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %17 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %5 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %6 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %6, %true, init() {\n"
|
|
" ^bb0(%arg5: !torch.int):\n"
|
|
" %9 = torch.aten.__getitem__.t %arg1, %arg5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.append.t %5, %9 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.append.t %5, %7 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.mm(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: mat2 must be a matrix\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: self must be a matrix\"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.eq.int %4, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.prim.ListConstruct %7, %8 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %9 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.dot(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %7 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %8 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %3, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.mv(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %8 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %9 = torch.aten.eq.int %8, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %9 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %3, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.prim.ListConstruct %6 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.matmul(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: mat2 must be a matrix\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: self must be a matrix\"\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_3 = torch.constant.str \"AssertionError: both arguments to matmul need to be at least 1D\"\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" %6 = torch.aten.eq.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %6 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.list<int>) {\n"
|
|
" %6 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %7 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" %13 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %14 = torch.aten.eq.int %13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %14 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %9 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %10 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %10, %11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %6 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %6 = torch.aten.eq.int %1, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" %9 = torch.aten.eq.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %9 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.list<int>) {\n"
|
|
" %9 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.aten.eq.int %9, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" %17 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %18 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.eq.int %12, %13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.prim.ListConstruct %15 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %16 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.eq.int %1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.list<int>) {\n"
|
|
" %12 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %13 = torch.aten.add.int %12, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.le.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" }\n"
|
|
" %16 = torch.aten.neg.int %15 : !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.sub.int %15, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.lt.int %int0, %16 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %34 = torch.aten.gt.int %int0, %17 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %34 : !torch.bool\n"
|
|
" }\n"
|
|
" %20 = torch.aten.__not__ %19 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %21 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %22 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %22, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %34 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.append.t %21, %34 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.aten.insert.t %21, %int0, %int1 : !torch.list<int>, !torch.int, !torch.int\n"
|
|
" %23 = torch.aten.len.t %21 : !torch.list<int> -> !torch.int\n"
|
|
" %24 = torch.aten.eq.int %23, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %24 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %25 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %26 = torch.aten.eq.int %25, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %26 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %27 = torch.aten.__getitem__.t %21, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %29 = torch.aten.eq.int %27, %28 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %29 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %30 = torch.aten.__getitem__.t %21, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %31 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.prim.ListConstruct %30, %31 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %33 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %int2, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %34 = torch.aten.eq.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %34 -> () {\n"
|
|
" %35 = torch.aten.__getitem__.t %32, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.ne.int %35, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %36 -> () {\n"
|
|
" %37 = torch.aten.__getitem__.t %32, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.append.t %33, %37 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %35 = torch.aten.__getitem__.t %32, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.append.t %33, %35 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %33 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %12 = torch.aten.eq.int %1, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %15 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.list<int>) {\n"
|
|
" %15 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %16 = torch.aten.eq.int %15, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.eq.int %19, %20 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %21 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %22 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.prim.ListConstruct %22, %23 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %24 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.ge.int %1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" %18 = torch.aten.ge.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %18 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.list<int>) {\n"
|
|
" %18 = torch.aten.gt.int %1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.int) {\n"
|
|
" %31 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %31 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %20 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %21 = torch.aten.sub.int %1, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %21, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %31 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.append.t %20, %31 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %22 = torch.aten.__getitem__.t %arg1, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %24 = torch.aten.sub.int %2, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %24, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %31 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.append.t %23, %31 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %25 = torch.aten.len.t %20 : !torch.list<int> -> !torch.int\n"
|
|
" %26 = torch.aten.len.t %23 : !torch.list<int> -> !torch.int\n"
|
|
" %27 = torch.prim.max.int %25, %26 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %27, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %31 = torch.aten.sub.int %27, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.sub.int %31, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %33 = torch.aten.sub.int %25, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.sub.int %33, %32 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.sub.int %26, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.sub.int %35, %32 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.ge.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %38 = torch.prim.If %37 -> (!torch.int) {\n"
|
|
" %47 = torch.aten.__getitem__.t %20, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %47 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %39 = torch.aten.ge.int %36, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %40 = torch.prim.If %39 -> (!torch.int) {\n"
|
|
" %47 = torch.aten.__getitem__.t %23, %36 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %47 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %41 = torch.aten.ne.int %38, %40 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %42 = torch.prim.If %41 -> (!torch.bool) {\n"
|
|
" %47 = torch.aten.ne.int %38, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %47 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %43 = torch.prim.If %42 -> (!torch.bool) {\n"
|
|
" %47 = torch.aten.ne.int %40, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %47 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %43 -> () {\n"
|
|
" %47 = torch.aten.format(%str, %38, %40, %arg2) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %48 = torch.aten.add.str %str_2, %47 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %48, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %44 = torch.aten.eq.int %38, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %45 = torch.prim.If %44 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %40 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %38 : !torch.int\n"
|
|
" }\n"
|
|
" %46 = torch.aten.append.t %28, %45 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %29 = torch.aten.gt.int %1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %29 -> () {\n"
|
|
" %31 = torch.aten.append.t %28, %19 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %30 = torch.aten.gt.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %30 -> () {\n"
|
|
" %31 = torch.aten.append.t %28, %22 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %28 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %17 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %14 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %11 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %8 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.broadcast(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}\"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.prim.max.int %0, %1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %2, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %4 = torch.aten.sub.int %2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.sub.int %4, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.sub.int %0, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.sub.int %6, %5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %8, %5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.ge.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %12 = torch.aten.ge.int %9, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg1, %9 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.ne.int %11, %13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.ne.int %11, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.ne.int %13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" %20 = torch.aten.format(%str_0, %11, %13, %arg2) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %21 = torch.aten.add.str %str, %20 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %21, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.eq.int %11, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %11 : !torch.int\n"
|
|
" }\n"
|
|
" %19 = torch.aten.append.t %3, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.linear(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: both arguments to matmul need to be at least 1D\"\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: self must be a matrix\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: mat2 must be a matrix\"\n"
|
|
" %str_2 = torch.constant.str \"The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}\"\n"
|
|
" %str_3 = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.le.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.list<int>) {\n"
|
|
" %13 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %13 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.eq.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.list<int>) {\n"
|
|
" %15 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.prim.ListConstruct %15 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %16 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.prim.ListConstruct %15, %16 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %17 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %14 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %5 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %6 = torch.prim.Uninitialized : !torch.list<int>\n"
|
|
" %7 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.len.t %4 : !torch.list<int> -> !torch.int\n"
|
|
" %9 = torch.aten.eq.int %7, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" %13 = torch.aten.eq.int %8, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %13 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.list<int>) {\n"
|
|
" %13 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %14 = torch.aten.eq.int %13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.len.t %4 : !torch.list<int> -> !torch.int\n"
|
|
" %20 = torch.aten.eq.int %19, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.__getitem__.t %4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %16, %17 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %5 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.eq.int %7, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.bool) {\n"
|
|
" %16 = torch.aten.eq.int %8, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %16 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.list<int>) {\n"
|
|
" %16 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %17 = torch.aten.eq.int %16, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.bool) {\n"
|
|
" %24 = torch.aten.len.t %4 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %25 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.__getitem__.t %4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.eq.int %19, %20 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %21 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %22 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.prim.ListConstruct %22 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %23 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %16 = torch.aten.eq.int %7, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.eq.int %8, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.list<int>) {\n"
|
|
" %19 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %20 = torch.aten.add.int %19, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.le.int %20, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %22 = torch.prim.If %21 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" }\n"
|
|
" %23 = torch.aten.neg.int %22 : !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.sub.int %22, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.lt.int %int0, %23 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %41 = torch.aten.gt.int %int0, %24 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %41 : !torch.bool\n"
|
|
" }\n"
|
|
" %27 = torch.aten.__not__ %26 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %27 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %28 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %29 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %29, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %41 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.append.t %28, %41 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.aten.insert.t %28, %int0, %int1 : !torch.list<int>, !torch.int, !torch.int\n"
|
|
" %30 = torch.aten.len.t %28 : !torch.list<int> -> !torch.int\n"
|
|
" %31 = torch.aten.eq.int %30, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %31 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %32 = torch.aten.len.t %4 : !torch.list<int> -> !torch.int\n"
|
|
" %33 = torch.aten.eq.int %32, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %33 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %34 = torch.aten.__getitem__.t %28, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.__getitem__.t %4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.eq.int %34, %35 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %36 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %37 = torch.aten.__getitem__.t %28, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.__getitem__.t %4, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.prim.ListConstruct %37, %38 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %40 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %int2, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %41 = torch.aten.eq.int %arg3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %41 -> () {\n"
|
|
" %42 = torch.aten.__getitem__.t %39, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.ne.int %42, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %43 -> () {\n"
|
|
" %44 = torch.aten.__getitem__.t %39, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.append.t %40, %44 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %42 = torch.aten.__getitem__.t %39, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.append.t %40, %42 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %40 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %19 = torch.aten.eq.int %7, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.bool) {\n"
|
|
" %22 = torch.aten.eq.int %8, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %22 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %21 = torch.prim.If %20 -> (!torch.list<int>) {\n"
|
|
" %22 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %23 = torch.aten.eq.int %22, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %24 = torch.aten.len.t %4 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %25 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %26 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.__getitem__.t %4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.eq.int %26, %27 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %28 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %29 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.__getitem__.t %4, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %31 = torch.prim.ListConstruct %29, %30 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %31 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %22 = torch.aten.ge.int %7, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" %25 = torch.aten.ge.int %8, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %25 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %24 = torch.prim.If %23 -> (!torch.list<int>) {\n"
|
|
" %25 = torch.aten.gt.int %7, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.int) {\n"
|
|
" %38 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %38 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %27 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %28 = torch.aten.sub.int %7, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %28, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %38 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.append.t %27, %38 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %29 = torch.aten.__getitem__.t %4, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %30 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %31 = torch.aten.sub.int %8, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %31, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %38 = torch.aten.__getitem__.t %4, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.append.t %30, %38 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %32 = torch.aten.len.t %27 : !torch.list<int> -> !torch.int\n"
|
|
" %33 = torch.aten.len.t %30 : !torch.list<int> -> !torch.int\n"
|
|
" %34 = torch.prim.max.int %32, %33 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %34, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %38 = torch.aten.sub.int %34, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.sub.int %38, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.sub.int %32, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %41 = torch.aten.sub.int %40, %39 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.sub.int %33, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.sub.int %42, %39 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.ge.int %41, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %45 = torch.prim.If %44 -> (!torch.int) {\n"
|
|
" %54 = torch.aten.__getitem__.t %27, %41 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %54 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %46 = torch.aten.ge.int %43, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %47 = torch.prim.If %46 -> (!torch.int) {\n"
|
|
" %54 = torch.aten.__getitem__.t %30, %43 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %54 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %48 = torch.aten.ne.int %45, %47 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %49 = torch.prim.If %48 -> (!torch.bool) {\n"
|
|
" %54 = torch.aten.ne.int %45, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %54 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %50 = torch.prim.If %49 -> (!torch.bool) {\n"
|
|
" %54 = torch.aten.ne.int %47, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %54 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %50 -> () {\n"
|
|
" %54 = torch.aten.format(%str_2, %45, %47, %arg3) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %55 = torch.aten.add.str %str_3, %54 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %55, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %51 = torch.aten.eq.int %45, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %52 = torch.prim.If %51 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %47 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %45 : !torch.int\n"
|
|
" }\n"
|
|
" %53 = torch.aten.append.t %35, %52 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %36 = torch.aten.gt.int %7, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %36 -> () {\n"
|
|
" %38 = torch.aten.append.t %35, %26 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %37 = torch.aten.gt.int %8, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %37 -> () {\n"
|
|
" %38 = torch.aten.append.t %35, %29 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %35 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %24 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %21 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %15 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %12 = torch.aten.__isnot__ %arg2, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" %13 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %14 = torch.aten.len.t %13 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.len.t %11 : !torch.list<int> -> !torch.int\n"
|
|
" %16 = torch.prim.max.int %14, %15 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %16, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %19 = torch.aten.sub.int %16, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.sub.int %19, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.sub.int %14, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.sub.int %21, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.sub.int %15, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.sub.int %23, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.ge.int %22, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.int) {\n"
|
|
" %35 = torch.aten.__getitem__.t %13, %22 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %35 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %27 = torch.aten.ge.int %24, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %28 = torch.prim.If %27 -> (!torch.int) {\n"
|
|
" %35 = torch.aten.__getitem__.t %11, %24 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %35 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %29 = torch.aten.ne.int %26, %28 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %30 = torch.prim.If %29 -> (!torch.bool) {\n"
|
|
" %35 = torch.aten.ne.int %26, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %35 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %31 = torch.prim.If %30 -> (!torch.bool) {\n"
|
|
" %35 = torch.aten.ne.int %28, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %35 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %31 -> () {\n"
|
|
" %35 = torch.aten.format(%str_2, %26, %28, %arg3) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %36 = torch.aten.add.str %str_3, %35 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %36, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %32 = torch.aten.eq.int %26, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %33 = torch.prim.If %32 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %28 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %26 : !torch.int\n"
|
|
" }\n"
|
|
" %34 = torch.aten.append.t %17, %33 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %18 = torch.aten.eq.int_list %17, %11 : !torch.list<int>, !torch.list<int> -> !torch.bool\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %11 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.t(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.le.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.list<int>) {\n"
|
|
" %5 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %5 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %5 = torch.aten.eq.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.list<int>) {\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.prim.ListConstruct %7 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %8 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.prim.ListConstruct %7, %8 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %9 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.max_pool2d(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str = torch.constant.str \"AssertionError: stride should not be zeero\"\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int-3 = torch.constant.int -3\n"
|
|
" %int-4 = torch.constant.int -4\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: max_pool2d: dilation must be either a single int, or a tuple of two ints\"\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: max_pool2d: padding must either be a single int, or a tuple of two ints\"\n"
|
|
" %str_3 = torch.constant.str \"AssertionError: max_pool2d: stride must either be omitted, a single int, or a tuple of two ints\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_4 = torch.constant.str \"AssertionError: max_pool2d: kernel_size must either be a single int, or a tuple of two ints\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %87 = torch.aten.eq.int %86, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %86 : !torch.int\n"
|
|
" }\n"
|
|
" %7 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %87 = torch.aten.eq.int %86, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %87 = torch.aten.eq.int %86, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %86 : !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %87 = torch.aten.eq.int %86, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %88 = torch.prim.If %87 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" } else {\n"
|
|
" %89 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %89 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %88 : !torch.int\n"
|
|
" }\n"
|
|
" %17 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %87 = torch.aten.eq.int %86, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %19 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %20 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %22 = torch.aten.eq.int %21, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.__getitem__.t %arg3, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %86 : !torch.int\n"
|
|
" }\n"
|
|
" %24 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %87 = torch.aten.eq.int %86, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %26 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %27 = torch.aten.__getitem__.t %arg4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %29 = torch.aten.eq.int %28, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %30 = torch.prim.If %29 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %27 : !torch.int\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.__getitem__.t %arg4, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %86 : !torch.int\n"
|
|
" }\n"
|
|
" %31 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %32 = torch.aten.eq.int %31, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %33 = torch.prim.If %32 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %87 = torch.aten.eq.int %86, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %33 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %34 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %35 = torch.aten.eq.int %34, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.int) {\n"
|
|
" %86 = torch.aten.__getitem__.t %arg0, %int-4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %86 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %37 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.ne.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %40 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %41 = torch.aten.add.int %38, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.add.int %41, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.mul.int %27, %43 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.sub.int %42, %44 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.sub.int %45, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %47 = torch.prim.If %arg5 -> (!torch.int) {\n"
|
|
" %86 = torch.aten.sub.int %13, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %86 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" %48 = torch.aten.add.int %46, %47 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %49 = torch.aten.floordiv.int %48, %13 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %50 = torch.aten.add.int %49, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %51 = torch.prim.If %arg5 -> (!torch.int) {\n"
|
|
" %86 = torch.aten.mul.int %49, %13 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %87 = torch.aten.add.int %38, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %88 = torch.aten.ge.int %86, %87 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %89 = torch.prim.If %88 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %49 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %50 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %89 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %50 : !torch.int\n"
|
|
" }\n"
|
|
" %52 = torch.aten.ne.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %52 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %53 = torch.aten.add.int %39, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %54 = torch.aten.add.int %53, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %55 = torch.aten.sub.int %6, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %56 = torch.aten.mul.int %30, %55 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %57 = torch.aten.sub.int %54, %56 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %58 = torch.aten.sub.int %57, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %59 = torch.prim.If %arg5 -> (!torch.int) {\n"
|
|
" %86 = torch.aten.sub.int %16, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %86 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" %60 = torch.aten.add.int %58, %59 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %61 = torch.aten.floordiv.int %60, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %62 = torch.aten.add.int %61, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %63 = torch.prim.If %arg5 -> (!torch.int) {\n"
|
|
" %86 = torch.aten.mul.int %61, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %87 = torch.aten.add.int %39, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %88 = torch.aten.ge.int %86, %87 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %89 = torch.prim.If %88 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %61 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %62 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %89 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %62 : !torch.int\n"
|
|
" }\n"
|
|
" %64 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %65 = torch.aten.gt.int %6, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %66 = torch.prim.If %65 -> (!torch.bool) {\n"
|
|
" %86 = torch.aten.gt.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %86 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %66 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %67 = torch.aten.gt.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %68 = torch.prim.If %67 -> (!torch.bool) {\n"
|
|
" %86 = torch.aten.gt.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %86 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %68 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %69 = torch.aten.gt.int %27, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %70 = torch.prim.If %69 -> (!torch.bool) {\n"
|
|
" %86 = torch.aten.gt.int %30, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %86 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %70 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %71 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %72 = torch.aten.ne.int %71, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %73 = torch.prim.If %72 -> (!torch.bool) {\n"
|
|
" %86 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %87 = torch.aten.ne.int %86, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %74 = torch.aten.eq.int %64, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %75 = torch.prim.If %74 -> (!torch.bool) {\n"
|
|
" %86 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %87 = torch.aten.ne.int %86, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %76 = torch.prim.If %75 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %73 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %77 = torch.prim.If %76 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %86 = torch.aten.eq.int %64, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %87 = torch.prim.If %86 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %73 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %88 = torch.prim.If %87 -> (!torch.bool) {\n"
|
|
" %89 = torch.aten.__getitem__.t %arg0, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %90 = torch.aten.ne.int %89, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %90 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %77 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %78 = torch.aten.floordiv.int %6, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %79 = torch.aten.ge.int %78, %23 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %80 = torch.prim.If %79 -> (!torch.bool) {\n"
|
|
" %86 = torch.aten.floordiv.int %3, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %87 = torch.aten.ge.int %86, %20 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %80 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %81 = torch.aten.ge.int %63, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %82 = torch.prim.If %81 -> (!torch.bool) {\n"
|
|
" %86 = torch.aten.ge.int %51, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %86 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %82 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %83 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %84 = torch.aten.eq.int %83, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %85 = torch.prim.If %84 -> (!torch.list<int>) {\n"
|
|
" %86 = torch.prim.ListConstruct %37, %51, %63 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %86 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %86 = torch.prim.ListConstruct %36, %37, %51, %63 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %86 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %85 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.pooling_output_shape(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: stride should not be zeero\"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.ne.int %arg3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %0 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.pooling_output_shape_pad_lr(%arg0, %arg1, %arg2, %arg2, %arg3, %arg4, %arg5) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.pooling_output_shape_pad_lr(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.bool) -> !torch.int {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.add.int %arg0, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %1 = torch.aten.add.int %0, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.sub.int %arg1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.mul.int %arg5, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.sub.int %1, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.sub.int %4, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.prim.If %arg6 -> (!torch.int) {\n"
|
|
" %11 = torch.aten.sub.int %arg4, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %11 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" %7 = torch.aten.add.int %5, %6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %8 = call @__torch__.torch.jit._shape_functions.div_rtn(%7, %arg4) : (!torch.int, !torch.int) -> !torch.int\n"
|
|
" %9 = torch.aten.add.int %8, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.prim.If %arg6 -> (!torch.int) {\n"
|
|
" %11 = torch.aten.sub.int %9, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.mul.int %11, %arg4 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.add.int %arg0, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ge.int %12, %13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.int) {\n"
|
|
" %16 = torch.aten.sub.int %9, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %16 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %15 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" }\n"
|
|
" return %10 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.div_rtn(%arg0: !torch.int, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %0 = torch.aten.floordiv.int %arg0, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.pool2d_shape_check(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.int, %arg7: !torch.int, %arg8: !torch.int, %arg9: !torch.int, %arg10: !torch.int, %arg11: !torch.int, %arg12: !torch.int, %arg13: !torch.int) -> !torch.none {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.gt.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.gt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.gt.int %arg4, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.gt.int %arg3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.gt.int %arg7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.gt.int %arg8, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.ne.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.ne.int %19, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.aten.eq.int %0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.ne.int %19, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %9 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %19 = torch.aten.eq.int %0, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %9 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %21 = torch.prim.If %20 -> (!torch.bool) {\n"
|
|
" %22 = torch.aten.__getitem__.t %arg0, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.ne.int %22, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %23 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %21 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %13 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %14 = torch.aten.floordiv.int %arg2, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.ge.int %14, %arg6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.floordiv.int %arg1, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.ge.int %19, %arg5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.ge.int %arg13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.ge.int %arg12, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %none : !torch.none\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.max_pool2d_with_indices(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str = torch.constant.str \"AssertionError: stride should not be zeero\"\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: max_pool2d: kernel_size must either be a single int, or a tuple of two ints\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: max_pool2d: stride must either be omitted, a single int, or a tuple of two ints\"\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: max_pool2d: padding must either be a single int, or a tuple of two ints\"\n"
|
|
" %str_3 = torch.constant.str \"AssertionError: max_pool2d: dilation must be either a single int, or a tuple of two ints\"\n"
|
|
" %str_4 = torch.constant.str \"AssertionError: \"\n"
|
|
" %int-4 = torch.constant.int -4\n"
|
|
" %int-3 = torch.constant.int -3\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %88 = torch.aten.eq.int %87, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %87 : !torch.int\n"
|
|
" }\n"
|
|
" %7 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %88 = torch.aten.eq.int %87, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %88 = torch.aten.eq.int %87, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %87 : !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %88 = torch.aten.eq.int %87, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %89 = torch.prim.If %88 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" } else {\n"
|
|
" %90 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %90 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %89 : !torch.int\n"
|
|
" }\n"
|
|
" %17 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %88 = torch.aten.eq.int %87, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %19 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %20 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %22 = torch.aten.eq.int %21, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.__getitem__.t %arg3, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %87 : !torch.int\n"
|
|
" }\n"
|
|
" %24 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %88 = torch.aten.eq.int %87, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %26 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %27 = torch.aten.__getitem__.t %arg4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %29 = torch.aten.eq.int %28, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %30 = torch.prim.If %29 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %27 : !torch.int\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.__getitem__.t %arg4, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %87 : !torch.int\n"
|
|
" }\n"
|
|
" %31 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %32 = torch.aten.eq.int %31, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %33 = torch.prim.If %32 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %88 = torch.aten.eq.int %87, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %33 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %34 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %35 = torch.aten.eq.int %34, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.int) {\n"
|
|
" %87 = torch.aten.__getitem__.t %arg0, %int-4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %87 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %37 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.ne.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %40 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %41 = torch.aten.add.int %38, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.add.int %41, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.mul.int %27, %43 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.sub.int %42, %44 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.sub.int %45, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %47 = torch.prim.If %arg5 -> (!torch.int) {\n"
|
|
" %87 = torch.aten.sub.int %13, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %87 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" %48 = torch.aten.add.int %46, %47 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %49 = torch.aten.floordiv.int %48, %13 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %50 = torch.aten.add.int %49, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %51 = torch.prim.If %arg5 -> (!torch.int) {\n"
|
|
" %87 = torch.aten.mul.int %49, %13 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %88 = torch.aten.add.int %38, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %89 = torch.aten.ge.int %87, %88 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %90 = torch.prim.If %89 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %49 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %50 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %90 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %50 : !torch.int\n"
|
|
" }\n"
|
|
" %52 = torch.aten.ne.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %52 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %53 = torch.aten.add.int %39, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %54 = torch.aten.add.int %53, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %55 = torch.aten.sub.int %6, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %56 = torch.aten.mul.int %30, %55 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %57 = torch.aten.sub.int %54, %56 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %58 = torch.aten.sub.int %57, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %59 = torch.prim.If %arg5 -> (!torch.int) {\n"
|
|
" %87 = torch.aten.sub.int %16, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %87 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" %60 = torch.aten.add.int %58, %59 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %61 = torch.aten.floordiv.int %60, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %62 = torch.aten.add.int %61, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %63 = torch.prim.If %arg5 -> (!torch.int) {\n"
|
|
" %87 = torch.aten.mul.int %61, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %88 = torch.aten.add.int %39, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %89 = torch.aten.ge.int %87, %88 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %90 = torch.prim.If %89 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %61 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %62 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %90 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %62 : !torch.int\n"
|
|
" }\n"
|
|
" %64 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %65 = torch.aten.gt.int %6, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %66 = torch.prim.If %65 -> (!torch.bool) {\n"
|
|
" %87 = torch.aten.gt.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %66 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %67 = torch.aten.gt.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %68 = torch.prim.If %67 -> (!torch.bool) {\n"
|
|
" %87 = torch.aten.gt.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %68 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %69 = torch.aten.gt.int %27, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %70 = torch.prim.If %69 -> (!torch.bool) {\n"
|
|
" %87 = torch.aten.gt.int %30, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %70 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %71 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %72 = torch.aten.ne.int %71, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %73 = torch.prim.If %72 -> (!torch.bool) {\n"
|
|
" %87 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %88 = torch.aten.ne.int %87, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %74 = torch.aten.eq.int %64, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %75 = torch.prim.If %74 -> (!torch.bool) {\n"
|
|
" %87 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %88 = torch.aten.ne.int %87, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %76 = torch.prim.If %75 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %73 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %77 = torch.prim.If %76 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %87 = torch.aten.eq.int %64, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %88 = torch.prim.If %87 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %73 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %89 = torch.prim.If %88 -> (!torch.bool) {\n"
|
|
" %90 = torch.aten.__getitem__.t %arg0, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %91 = torch.aten.ne.int %90, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %91 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %89 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %77 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %78 = torch.aten.floordiv.int %6, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %79 = torch.aten.ge.int %78, %23 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %80 = torch.prim.If %79 -> (!torch.bool) {\n"
|
|
" %87 = torch.aten.floordiv.int %3, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %88 = torch.aten.ge.int %87, %20 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %88 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %80 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %81 = torch.aten.ge.int %63, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %82 = torch.prim.If %81 -> (!torch.bool) {\n"
|
|
" %87 = torch.aten.ge.int %51, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %87 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %82 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %83 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %84 = torch.aten.eq.int %83, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %85 = torch.prim.If %84 -> (!torch.list<int>) {\n"
|
|
" %87 = torch.prim.ListConstruct %37, %51, %63 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %87 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %87 = torch.prim.ListConstruct %36, %37, %51, %63 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %87 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %86 = torch.prim.TupleConstruct %85, %85 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %86 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.transpose(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.le.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" %3 = torch.aten.neg.int %2 : !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.sub.int %2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.lt.int %arg1, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %21 = torch.aten.gt.int %arg1, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %21 : !torch.bool\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" %21 = torch.aten.add.int %arg1, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %21 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %10 = torch.aten.le.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" %12 = torch.aten.neg.int %11 : !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.sub.int %11, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.lt.int %arg2, %12 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %21 = torch.aten.gt.int %arg2, %13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %21 : !torch.bool\n"
|
|
" }\n"
|
|
" %16 = torch.aten.__not__ %15 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.lt.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.int) {\n"
|
|
" %21 = torch.aten.add.int %arg2, %11 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %21 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg2 : !torch.int\n"
|
|
" }\n"
|
|
" %19 = torch.aten.eq.int %9, %18 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.list<int>) {\n"
|
|
" %21 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %22 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %22, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.append.t %21, %23 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %21 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %21 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %0, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %22 = torch.aten.eq.int %arg3, %9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %22 -> () {\n"
|
|
" %23 = torch.aten.__getitem__.t %arg0, %18 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.append.t %21, %23 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %23 = torch.aten.eq.int %arg3, %18 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg0, %9 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.append.t %21, %24 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.append.t %21, %24 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %21 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %20 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.conv1d(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.prim.Loop %6, %true, init(%false) {\n"
|
|
" ^bb0(%arg7: !torch.int, %arg8: !torch.bool):\n"
|
|
" %34 = torch.aten.__getitem__.t %arg4, %arg7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.lt.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg8 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%36 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.prim.Loop %9, %true, init(%false) {\n"
|
|
" ^bb0(%arg7: !torch.int, %arg8: !torch.bool):\n"
|
|
" %34 = torch.aten.__getitem__.t %arg3, %arg7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.lt.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg8 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%36 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" %11 = torch.aten.__not__ %10 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.eq.int %5, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ge.int %13, %arg6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %15 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.remainder.int %15, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.eq.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %17 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %18 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.mul.int %19, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.eq.int %18, %20 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %21 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %22 = torch.aten.__is__ %arg2, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %34 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %35 = torch.aten.len.t %34 : !torch.list<int> -> !torch.int\n"
|
|
" %36 = torch.aten.eq.int %35, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %37 = torch.prim.If %36 -> (!torch.bool) {\n"
|
|
" %38 = torch.aten.__getitem__.t %34, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %38, %39 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %40 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %37 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %24 = torch.aten.__range_length %int2, %4, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %24, %true, init() {\n"
|
|
" ^bb0(%arg7: !torch.int):\n"
|
|
" %34 = torch.aten.__derive_index %arg7, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.__getitem__.t %arg0, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.__getitem__.t %arg4, %36 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.mul.int %37, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.add.int %35, %38 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %41 = torch.aten.__getitem__.t %arg5, %40 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg1, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.sub.int %42, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.mul.int %41, %43 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.add.int %44, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.ge.int %39, %45 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %46 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %25 = torch.aten.len.t %arg5 : !torch.list<int> -> !torch.int\n"
|
|
" %26 = torch.aten.gt.int %25, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %27 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %28 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %29 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.append.t %28, %29 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %31 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.append.t %28, %31 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %33 = torch.aten.__range_length %int2, %27, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %33, %true, init() {\n"
|
|
" ^bb0(%arg7: !torch.int):\n"
|
|
" %34 = torch.aten.__derive_index %arg7, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.prim.If %26 -> (!torch.int) {\n"
|
|
" %51 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %52 = torch.aten.__getitem__.t %arg5, %51 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %52 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %36 = torch.aten.__getitem__.t %arg1, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.sub.int %36, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.mul.int %35, %37 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.add.int %38, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.__getitem__.t %arg0, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %41 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg4, %41 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.mul.int %42, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.add.int %40, %43 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.sub.int %44, %39 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg3, %46 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.aten.floordiv.int %45, %47 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %49 = torch.aten.add.int %48, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %50 = torch.aten.append.t %28, %49 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %28 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.conv_output_size(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.check_shape_forward(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.int) -> !torch.none\n"
|
|
" %1 = torch.aten.len.t %arg5 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.gt.int %1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %5 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.append.t %4, %5 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %7 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.append.t %4, %7 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %9 = torch.aten.__range_length %int2, %3, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %9, %true, init() {\n"
|
|
" ^bb0(%arg7: !torch.int):\n"
|
|
" %10 = torch.aten.__derive_index %arg7, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" %27 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.__getitem__.t %arg5, %27 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %28 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %12 = torch.aten.__getitem__.t %arg1, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.sub.int %12, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.mul.int %11, %13 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.add.int %14, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.__getitem__.t %arg4, %17 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.mul.int %int2, %18 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.add.int %16, %19 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.sub.int %20, %15 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.__getitem__.t %arg3, %22 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.floordiv.int %21, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.add.int %24, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.append.t %4, %25 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.check_shape_forward(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.none {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = call @__torch__.torch.jit._shape_functions.check_non_negative(%arg4) : (!torch.list<int>) -> !torch.bool\n"
|
|
" %3 = torch.aten.__not__ %2 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = call @__torch__.torch.jit._shape_functions.check_non_negative(%arg3) : (!torch.list<int>) -> !torch.bool\n"
|
|
" %5 = torch.aten.__not__ %4 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.eq.int %1, %0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.ge.int %7, %arg6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.remainder.int %9, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.eq.int %10, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.mul.int %13, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %12, %14 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.aten.__is__ %arg2, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %19 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %20 = torch.aten.len.t %19 : !torch.list<int> -> !torch.int\n"
|
|
" %21 = torch.aten.eq.int %20, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %22 = torch.prim.If %21 -> (!torch.bool) {\n"
|
|
" %23 = torch.aten.__getitem__.t %19, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %23, %24 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %25 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %22 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %17 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %18 = torch.aten.__range_length %int2, %0, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %18, %true, init() {\n"
|
|
" ^bb0(%arg7: !torch.int):\n"
|
|
" %19 = torch.aten.__derive_index %arg7, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %19 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.sub.int %19, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.__getitem__.t %arg4, %21 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.mul.int %int2, %22 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.add.int %20, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.sub.int %19, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.__getitem__.t %arg5, %25 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.__getitem__.t %arg1, %19 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.sub.int %27, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %29 = torch.aten.mul.int %26, %28 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.add.int %29, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %31 = torch.aten.ge.int %24, %30 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %31 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %none : !torch.none\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.check_non_negative(%arg0: !torch.list<int>) -> !torch.bool {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.Loop %0, %true, init(%false) {\n"
|
|
" ^bb0(%arg1: !torch.int, %arg2: !torch.bool):\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.lt.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg2 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%4 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" return %1 : !torch.bool\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.conv2d(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.prim.Loop %6, %true, init(%false) {\n"
|
|
" ^bb0(%arg7: !torch.int, %arg8: !torch.bool):\n"
|
|
" %34 = torch.aten.__getitem__.t %arg4, %arg7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.lt.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg8 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%36 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.prim.Loop %9, %true, init(%false) {\n"
|
|
" ^bb0(%arg7: !torch.int, %arg8: !torch.bool):\n"
|
|
" %34 = torch.aten.__getitem__.t %arg3, %arg7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.lt.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg8 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%36 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" %11 = torch.aten.__not__ %10 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.eq.int %5, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ge.int %13, %arg6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %15 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.remainder.int %15, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.eq.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %17 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %18 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.mul.int %19, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.eq.int %18, %20 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %21 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %22 = torch.aten.__is__ %arg2, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %34 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %35 = torch.aten.len.t %34 : !torch.list<int> -> !torch.int\n"
|
|
" %36 = torch.aten.eq.int %35, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %37 = torch.prim.If %36 -> (!torch.bool) {\n"
|
|
" %38 = torch.aten.__getitem__.t %34, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %38, %39 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %40 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %37 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %24 = torch.aten.__range_length %int2, %4, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %24, %true, init() {\n"
|
|
" ^bb0(%arg7: !torch.int):\n"
|
|
" %34 = torch.aten.__derive_index %arg7, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.__getitem__.t %arg0, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.__getitem__.t %arg4, %36 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.mul.int %37, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.add.int %35, %38 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %41 = torch.aten.__getitem__.t %arg5, %40 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg1, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.sub.int %42, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.mul.int %41, %43 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.add.int %44, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.ge.int %39, %45 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %46 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %25 = torch.aten.len.t %arg5 : !torch.list<int> -> !torch.int\n"
|
|
" %26 = torch.aten.gt.int %25, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %27 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %28 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %29 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.append.t %28, %29 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %31 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.append.t %28, %31 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %33 = torch.aten.__range_length %int2, %27, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %33, %true, init() {\n"
|
|
" ^bb0(%arg7: !torch.int):\n"
|
|
" %34 = torch.aten.__derive_index %arg7, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.prim.If %26 -> (!torch.int) {\n"
|
|
" %51 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %52 = torch.aten.__getitem__.t %arg5, %51 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %52 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %36 = torch.aten.__getitem__.t %arg1, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.sub.int %36, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.mul.int %35, %37 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.add.int %38, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.__getitem__.t %arg0, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %41 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg4, %41 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.mul.int %42, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.add.int %40, %43 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.sub.int %44, %39 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg3, %46 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.aten.floordiv.int %45, %47 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %49 = torch.aten.add.int %48, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %50 = torch.aten.append.t %28, %49 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %28 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.batch_norm(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.optional<list<int>>, %arg5: !torch.bool, %arg6: !torch.float, %arg7: !torch.float, %arg8: !torch.bool) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %1, %true, init() {\n"
|
|
" ^bb0(%arg9: !torch.int):\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %arg9 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.append.t %0, %2 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.conv3d(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.prim.Loop %6, %true, init(%false) {\n"
|
|
" ^bb0(%arg7: !torch.int, %arg8: !torch.bool):\n"
|
|
" %34 = torch.aten.__getitem__.t %arg4, %arg7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.lt.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg8 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%36 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.prim.Loop %9, %true, init(%false) {\n"
|
|
" ^bb0(%arg7: !torch.int, %arg8: !torch.bool):\n"
|
|
" %34 = torch.aten.__getitem__.t %arg3, %arg7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.lt.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg8 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%36 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" %11 = torch.aten.__not__ %10 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.eq.int %5, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ge.int %13, %arg6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %15 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.remainder.int %15, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.eq.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %17 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %18 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.mul.int %19, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.eq.int %18, %20 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %21 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %22 = torch.aten.__is__ %arg2, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %34 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %35 = torch.aten.len.t %34 : !torch.list<int> -> !torch.int\n"
|
|
" %36 = torch.aten.eq.int %35, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %37 = torch.prim.If %36 -> (!torch.bool) {\n"
|
|
" %38 = torch.aten.__getitem__.t %34, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %38, %39 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %40 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %37 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %24 = torch.aten.__range_length %int2, %4, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %24, %true, init() {\n"
|
|
" ^bb0(%arg7: !torch.int):\n"
|
|
" %34 = torch.aten.__derive_index %arg7, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.__getitem__.t %arg0, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.__getitem__.t %arg4, %36 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.mul.int %37, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.add.int %35, %38 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %41 = torch.aten.__getitem__.t %arg5, %40 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg1, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.sub.int %42, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.mul.int %41, %43 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.add.int %44, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.ge.int %39, %45 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %46 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %25 = torch.aten.len.t %arg5 : !torch.list<int> -> !torch.int\n"
|
|
" %26 = torch.aten.gt.int %25, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %27 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %28 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %29 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.append.t %28, %29 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %31 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.append.t %28, %31 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %33 = torch.aten.__range_length %int2, %27, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %33, %true, init() {\n"
|
|
" ^bb0(%arg7: !torch.int):\n"
|
|
" %34 = torch.aten.__derive_index %arg7, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.prim.If %26 -> (!torch.int) {\n"
|
|
" %51 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %52 = torch.aten.__getitem__.t %arg5, %51 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %52 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %36 = torch.aten.__getitem__.t %arg1, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.sub.int %36, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.mul.int %35, %37 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.add.int %38, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.__getitem__.t %arg0, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %41 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg4, %41 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.mul.int %42, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.add.int %40, %43 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.sub.int %44, %39 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.sub.int %34, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg3, %46 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.aten.floordiv.int %45, %47 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %49 = torch.aten.add.int %48, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %50 = torch.aten.append.t %28, %49 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %28 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.conv_backwards(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.optional<list<int>>) -> !torch.tuple<list<int>, list<int>, list<int>> {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %1, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %7 = torch.aten.__getitem__.t %arg1, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.append.t %0, %7 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %2 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %3 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %7 = torch.aten.__getitem__.t %arg2, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.append.t %2, %7 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct %4 : (!torch.int) -> !torch.list<int>\n"
|
|
" %6 = torch.prim.TupleConstruct %0, %2, %5 : !torch.list<int>, !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" return %6 : !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.conv_forwards(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>, %arg8: !torch.int) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.aten.len.t %arg5 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.gt.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.aten.len.t %arg7 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.gt.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %6 = torch.prim.If %arg6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.append.t %5, %7 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If %arg6 -> () {\n"
|
|
" %10 = torch.aten.__getitem__.t %arg1, %6 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.mul.int %10, %arg8 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.append.t %5, %11 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %10 = torch.aten.__getitem__.t %arg1, %6 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.append.t %5, %10 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__range_length %int2, %4, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %9, %true, init() {\n"
|
|
" ^bb0(%arg9: !torch.int):\n"
|
|
" %10 = torch.aten.__derive_index %arg9, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" %13 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %arg5, %13 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %12 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" %13 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %arg7, %13 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If %arg6 -> () {\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.sub.int %13, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.mul.int %11, %14 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.sub.int %16, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg3, %18 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.mul.int %17, %19 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.__getitem__.t %arg4, %21 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.mul.int %22, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.sub.int %20, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.add.int %24, %15 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.add.int %25, %12 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.add.int %26, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.append.t %5, %27 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.sub.int %13, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.mul.int %11, %14 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.add.int %15, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg4, %18 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.mul.int %19, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.add.int %17, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.sub.int %21, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.__getitem__.t %arg3, %23 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.floordiv.int %22, %24 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.add.int %25, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.append.t %5, %26 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions._conv_forwards(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>, %arg8: !torch.int, %arg9: !torch.bool, %arg10: !torch.bool, %arg11: !torch.bool, %arg12: !torch.bool) -> !torch.list<int> {\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.aten.len.t %arg5 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.gt.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.aten.len.t %arg7 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.gt.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %6 = torch.prim.If %arg6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.append.t %5, %7 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If %arg6 -> () {\n"
|
|
" %10 = torch.aten.__getitem__.t %arg1, %6 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.mul.int %10, %arg8 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.append.t %5, %11 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %10 = torch.aten.__getitem__.t %arg1, %6 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.append.t %5, %10 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__range_length %int2, %4, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %9, %true, init() {\n"
|
|
" ^bb0(%arg13: !torch.int):\n"
|
|
" %10 = torch.aten.__derive_index %arg13, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" %13 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %arg5, %13 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %12 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" %13 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %arg7, %13 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If %arg6 -> () {\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.sub.int %13, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.mul.int %11, %14 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.sub.int %16, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg3, %18 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.mul.int %17, %19 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.__getitem__.t %arg4, %21 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.mul.int %22, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.sub.int %20, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.add.int %24, %15 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.add.int %25, %12 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.add.int %26, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.append.t %5, %27 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.sub.int %13, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.mul.int %11, %14 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.add.int %15, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg4, %18 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.mul.int %19, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.add.int %17, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.sub.int %21, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.sub.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.__getitem__.t %arg3, %23 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.floordiv.int %22, %24 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.add.int %25, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.append.t %5, %26 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.conv_transpose2d_input(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.optional<list<int>>, %arg5: !torch.optional<list<int>>, %arg6: !torch.int, %arg7: !torch.optional<list<int>>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.aten.__is__ %arg3, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.list<int>) {\n"
|
|
" %18 = torch.prim.ListConstruct %int1, %int1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %18 = torch.prim.unchecked_cast %arg3 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %2 = torch.aten.__is__ %arg4, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.list<int>) {\n"
|
|
" %18 = torch.prim.ListConstruct %int0, %int0 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %18 = torch.prim.unchecked_cast %arg4 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %4 = torch.aten.__is__ %arg5, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.list<int>) {\n"
|
|
" %18 = torch.prim.ListConstruct %int0, %int0 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %18 = torch.prim.unchecked_cast %arg5 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %6 = torch.aten.__is__ %arg7, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.list<int>) {\n"
|
|
" %18 = torch.prim.ListConstruct %int1, %int1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %18 = torch.prim.unchecked_cast %arg7 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %18 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %8 = torch.aten.len.t %7 : !torch.list<int> -> !torch.int\n"
|
|
" %9 = torch.aten.gt.int %8, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %11 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.append.t %11, %12 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %14 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.mul.int %14, %arg6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.append.t %11, %15 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %17 = torch.aten.__range_length %int2, %10, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %17, %true, init() {\n"
|
|
" ^bb0(%arg8: !torch.int):\n"
|
|
" %18 = torch.aten.__derive_index %arg8, %int2, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" %38 = torch.aten.sub.int %18, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %7, %38 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %39 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %20 = torch.aten.__getitem__.t %arg1, %18 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.sub.int %20, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.mul.int %19, %21 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.__getitem__.t %arg0, %18 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.sub.int %23, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.sub.int %18, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.__getitem__.t %1, %25 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.mul.int %24, %26 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.sub.int %18, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %29 = torch.aten.__getitem__.t %3, %28 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.mul.int %29, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %31 = torch.aten.sub.int %27, %30 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.add.int %31, %22 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %33 = torch.aten.sub.int %18, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.__getitem__.t %5, %33 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.add.int %32, %34 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.add.int %35, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.append.t %11, %36 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %11 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.flatten(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.le.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" %3 = torch.aten.neg.int %2 : !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.sub.int %2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.lt.int %arg1, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.gt.int %arg1, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %24 : !torch.bool\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.add.int %arg1, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %10 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %11 = torch.aten.le.int %10, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %10 : !torch.int\n"
|
|
" }\n"
|
|
" %13 = torch.aten.neg.int %12 : !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.sub.int %12, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.lt.int %arg2, %13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.gt.int %arg2, %14 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %24 : !torch.bool\n"
|
|
" }\n"
|
|
" %17 = torch.aten.__not__ %16 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %17 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %18 = torch.aten.lt.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.add.int %arg2, %12 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg2 : !torch.int\n"
|
|
" }\n"
|
|
" %20 = torch.aten.le.int %9, %19 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %21 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %22 = torch.aten.eq.int %21, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.list<int>) {\n"
|
|
" %24 = torch.prim.ListConstruct %int1 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %24 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.eq.int %9, %19 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %25 = torch.prim.If %24 -> (!torch.list<int>) {\n"
|
|
" %26 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %27 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %27, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %28 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %29 = torch.aten.append.t %26, %28 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %26 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %26 = torch.aten.add.int %19, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.__range_length %9, %26, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.prim.Loop %27, %true, init(%int1) {\n"
|
|
" ^bb0(%arg3: !torch.int, %arg4: !torch.int):\n"
|
|
" %34 = torch.aten.__derive_index %arg3, %9, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.__getitem__.t %arg0, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.mul.int %arg4, %35 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%36 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %29 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %9, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %34 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.append.t %29, %34 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %30 = torch.aten.append.t %29, %28 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %31 = torch.aten.add.int %19, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %33 = torch.aten.__range_length %31, %32, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %33, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %34 = torch.aten.__derive_index %arg3, %31, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.__getitem__.t %arg0, %34 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.append.t %29, %35 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %29 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %25 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %23 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.cat(%arg0: !torch.list<list<int>>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: Sizes of tensors must match except in dimension\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: Tensors must have same number of dimensions\"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" torch.prim.Loop %0, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %14 = torch.aten.len.t %13 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.gt.int %14, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %2 = torch.derefine %none : !torch.none to !torch.optional<int>\n"
|
|
" %3 = torch.prim.Loop %1, %true, init(%2) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.optional<int>):\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %14 = torch.aten.len.t %13 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.__getitem__.t %13, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.eq.int %19, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %17 = torch.aten.__not__ %16 : !torch.bool -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.optional<int>) {\n"
|
|
" %19 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.int) {\n"
|
|
" %22 = torch.aten.len.t %13 : !torch.list<int> -> !torch.int\n"
|
|
" %23 = torch.aten.le.int %22, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %24 = torch.prim.If %23 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %22 : !torch.int\n"
|
|
" }\n"
|
|
" %25 = torch.aten.neg.int %24 : !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.sub.int %24, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.lt.int %arg1, %25 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %28 = torch.prim.If %27 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %32 = torch.aten.gt.int %arg1, %26 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %32 : !torch.bool\n"
|
|
" }\n"
|
|
" %29 = torch.aten.__not__ %28 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %29 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %30 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %31 = torch.prim.If %30 -> (!torch.int) {\n"
|
|
" %32 = torch.aten.add.int %arg1, %24 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %32 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %31 : !torch.int\n"
|
|
" } else {\n"
|
|
" %22 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %22 : !torch.int\n"
|
|
" }\n"
|
|
" %21 = torch.derefine %20 : !torch.int to !torch.optional<int>\n"
|
|
" torch.prim.If.yield %21 : !torch.optional<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.optional<int>\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%18 : !torch.optional<int>)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.optional<int>) -> !torch.optional<int>\n"
|
|
" %4 = torch.aten.__is__ %3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %13 = torch.prim.unchecked_cast %3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" }\n"
|
|
" %6 = torch.aten.len.t %arg0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %7 = torch.aten.gt.int %6, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = torch.aten.len.t %arg0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %9 = torch.derefine %none : !torch.none to !torch.optional<list<int>>\n"
|
|
" %10 = torch.prim.Loop %8, %true, init(%9) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.optional<list<int>>):\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %14 = torch.aten.len.t %13 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.prim.Loop %14, %true, init(%int1) {\n"
|
|
" ^bb0(%arg4: !torch.int, %arg5: !torch.int):\n"
|
|
" %20 = torch.aten.__getitem__.t %13, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.mul.int %arg5, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%21 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %16 = torch.aten.eq.int %15, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.len.t %13 : !torch.list<int> -> !torch.int\n"
|
|
" %21 = torch.aten.eq.int %20, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %21 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %18 = torch.aten.__not__ %17 : !torch.bool -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.optional<list<int>>) {\n"
|
|
" %20 = torch.derefine %13 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" torch.prim.If.yield %20 : !torch.optional<list<int>>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.optional<list<int>>\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%19 : !torch.optional<list<int>>)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.optional<list<int>>) -> !torch.optional<list<int>>\n"
|
|
" %11 = torch.aten.__is__ %10, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.list<int>) {\n"
|
|
" %13 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %13 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %13 = torch.prim.unchecked_cast %10 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %14 = torch.aten.len.t %arg0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %15 = torch.prim.Loop %14, %true, init(%int0) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.int):\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %20 = torch.aten.len.t %19 : !torch.list<int> -> !torch.int\n"
|
|
" %21 = torch.prim.Loop %20, %true, init(%int1) {\n"
|
|
" ^bb0(%arg4: !torch.int, %arg5: !torch.int):\n"
|
|
" %26 = torch.aten.__getitem__.t %19, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.mul.int %arg5, %26 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%27 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %22 = torch.aten.eq.int %21, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" %26 = torch.aten.len.t %19 : !torch.list<int> -> !torch.int\n"
|
|
" %27 = torch.aten.eq.int %26, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %27 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %24 = torch.aten.__not__ %23 : !torch.bool -> !torch.bool\n"
|
|
" %25 = torch.prim.If %24 -> (!torch.int) {\n"
|
|
" %26 = torch.aten.len.t %13 : !torch.list<int> -> !torch.int\n"
|
|
" %27 = torch.aten.len.t %19 : !torch.list<int> -> !torch.int\n"
|
|
" %28 = torch.aten.eq.int %26, %27 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %28 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %29 = torch.aten.__range_length %int0, %26, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %29, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %32 = torch.aten.__derive_index %arg4, %int0, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %33 = torch.aten.ne.int %32, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %33 -> () {\n"
|
|
" %34 = torch.aten.__getitem__.t %13, %32 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.__getitem__.t %19, %32 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.eq.int %34, %35 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %36 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %30 = torch.aten.__getitem__.t %19, %5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %31 = torch.aten.add.int %arg3, %30 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %31 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%25 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %16 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %17 = torch.aten.len.t %13 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %17, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %19 = torch.aten.__getitem__.t %13, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.append.t %16, %19 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %18 = torch.aten._set_item.t %16, %5, %15 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %16 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %12 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.check_cat_no_zero_dim(%arg0: !torch.list<list<int>>) -> !torch.none {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" torch.prim.Loop %0, %true, init() {\n"
|
|
" ^bb0(%arg1: !torch.int):\n"
|
|
" %1 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %2 = torch.aten.len.t %1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.gt.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %none : !torch.none\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.legacy_cat_wrap_dim(%arg0: !torch.int, %arg1: !torch.list<list<int>>) -> !torch.int {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %1 = torch.derefine %none : !torch.none to !torch.optional<int>\n"
|
|
" %2 = torch.prim.Loop %0, %true, init(%1) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.optional<int>):\n"
|
|
" %5 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %6 = torch.aten.len.t %5 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %6, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" %11 = torch.aten.__getitem__.t %5, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__not__ %8 : !torch.bool -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.optional<int>) {\n"
|
|
" %11 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.int) {\n"
|
|
" %14 = torch.aten.len.t %5 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = func.call @__torch__.torch.jit._shape_functions.maybe_wrap_dim(%arg0, %14, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" torch.prim.If.yield %15 : !torch.int\n"
|
|
" } else {\n"
|
|
" %14 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" }\n"
|
|
" %13 = torch.derefine %12 : !torch.int to !torch.optional<int>\n"
|
|
" torch.prim.If.yield %13 : !torch.optional<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.optional<int>\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%10 : !torch.optional<int>)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.optional<int>) -> !torch.optional<int>\n"
|
|
" %3 = torch.aten.__is__ %2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %arg0 : !torch.int\n"
|
|
" } else {\n"
|
|
" %5 = torch.prim.unchecked_cast %2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.should_skip(%arg0: !torch.list<int>) -> !torch.bool {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.numel(%arg0) : (!torch.list<int>) -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %3 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %3, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %4 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" return %2 : !torch.bool\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.numel(%arg0: !torch.list<int>) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.Loop %0, %true, init(%int1) {\n"
|
|
" ^bb0(%arg1: !torch.int, %arg2: !torch.int):\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.mul.int %arg2, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%3 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.check_cat_shape_except_dim(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.int) -> !torch.none {\n"
|
|
" %str = torch.constant.str \"AssertionError: Sizes of tensors must match except in dimension\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: Tensors must have same number of dimensions\"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__range_length %int0, %0, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %4 = torch.aten.__derive_index %arg4, %int0, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.ne.int %4, %arg2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" %6 = torch.aten.__getitem__.t %arg0, %4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.__getitem__.t %arg1, %4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %6, %7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %none : !torch.none\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.stack(%arg0: !torch.list<list<int>>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str = torch.constant.str \"AssertionError: Tensors must have same number of dimensions\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: Sizes of tensors must match except in dimension\"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<list<int>>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" torch.prim.Loop %1, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %17 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.add.int %17, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.le.int %18, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %18 : !torch.int\n"
|
|
" }\n"
|
|
" %21 = torch.aten.neg.int %20 : !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.sub.int %20, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.lt.int %arg1, %21 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %24 = torch.prim.If %23 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %31 = torch.aten.gt.int %arg1, %22 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %31 : !torch.bool\n"
|
|
" }\n"
|
|
" %25 = torch.aten.__not__ %24 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %25 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %26 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %27 = torch.prim.If %26 -> (!torch.int) {\n"
|
|
" %31 = torch.aten.add.int %arg1, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %31 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %28 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %29 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %29, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %31 = torch.aten.__getitem__.t %16, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.append.t %28, %31 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.aten.insert.t %28, %27, %int1 : !torch.list<int>, !torch.int, !torch.int\n"
|
|
" %30 = torch.aten.append.t %0, %28 : !torch.list<list<int>>, !torch.list<int> -> !torch.list<list<int>>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %2 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>\n"
|
|
" %3 = torch.aten.len.t %0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %16 = torch.aten.__getitem__.t %0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %17 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.gt.int %17, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %4 = torch.aten.len.t %0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %5 = torch.derefine %none : !torch.none to !torch.optional<int>\n"
|
|
" %6 = torch.prim.Loop %4, %true, init(%5) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.optional<int>):\n"
|
|
" %16 = torch.aten.__getitem__.t %0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %17 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" %22 = torch.aten.__getitem__.t %16, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.eq.int %22, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %23 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %20 = torch.aten.__not__ %19 : !torch.bool -> !torch.bool\n"
|
|
" %21 = torch.prim.If %20 -> (!torch.optional<int>) {\n"
|
|
" %22 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.int) {\n"
|
|
" %25 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" %26 = torch.aten.le.int %25, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %27 = torch.prim.If %26 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %25 : !torch.int\n"
|
|
" }\n"
|
|
" %28 = torch.aten.neg.int %27 : !torch.int -> !torch.int\n"
|
|
" %29 = torch.aten.sub.int %27, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.lt.int %arg1, %28 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %31 = torch.prim.If %30 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %35 = torch.aten.gt.int %arg1, %29 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %35 : !torch.bool\n"
|
|
" }\n"
|
|
" %32 = torch.aten.__not__ %31 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %32 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %33 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %34 = torch.prim.If %33 -> (!torch.int) {\n"
|
|
" %35 = torch.aten.add.int %arg1, %27 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %35 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %34 : !torch.int\n"
|
|
" } else {\n"
|
|
" %25 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %25 : !torch.int\n"
|
|
" }\n"
|
|
" %24 = torch.derefine %23 : !torch.int to !torch.optional<int>\n"
|
|
" torch.prim.If.yield %24 : !torch.optional<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.optional<int>\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%21 : !torch.optional<int>)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.optional<int>) -> !torch.optional<int>\n"
|
|
" %7 = torch.aten.__is__ %6, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %16 = torch.prim.unchecked_cast %6 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %16 : !torch.int\n"
|
|
" }\n"
|
|
" %9 = torch.aten.len.t %0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %10 = torch.aten.gt.int %9, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.len.t %0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %12 = torch.derefine %none : !torch.none to !torch.optional<list<int>>\n"
|
|
" %13 = torch.prim.Loop %11, %true, init(%12) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.optional<list<int>>):\n"
|
|
" %16 = torch.aten.__getitem__.t %0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %17 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.prim.Loop %17, %true, init(%int1) {\n"
|
|
" ^bb0(%arg4: !torch.int, %arg5: !torch.int):\n"
|
|
" %23 = torch.aten.__getitem__.t %16, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.mul.int %arg5, %23 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%24 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %19 = torch.aten.eq.int %18, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.bool) {\n"
|
|
" %23 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" %24 = torch.aten.eq.int %23, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %24 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %21 = torch.aten.__not__ %20 : !torch.bool -> !torch.bool\n"
|
|
" %22 = torch.prim.If %21 -> (!torch.optional<list<int>>) {\n"
|
|
" %23 = torch.derefine %16 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" torch.prim.If.yield %23 : !torch.optional<list<int>>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.optional<list<int>>\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%22 : !torch.optional<list<int>>)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.optional<list<int>>) -> !torch.optional<list<int>>\n"
|
|
" %14 = torch.aten.__is__ %13, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.list<int>) {\n"
|
|
" torch.prim.If.yield %2 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %16 = torch.prim.unchecked_cast %13 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %17 = torch.aten.len.t %0 : !torch.list<list<int>> -> !torch.int\n"
|
|
" %18 = torch.prim.Loop %17, %true, init(%int0) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.int):\n"
|
|
" %22 = torch.aten.__getitem__.t %0, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %23 = torch.aten.len.t %22 : !torch.list<int> -> !torch.int\n"
|
|
" %24 = torch.prim.Loop %23, %true, init(%int1) {\n"
|
|
" ^bb0(%arg4: !torch.int, %arg5: !torch.int):\n"
|
|
" %29 = torch.aten.__getitem__.t %22, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.mul.int %arg5, %29 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%30 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.bool) {\n"
|
|
" %29 = torch.aten.len.t %22 : !torch.list<int> -> !torch.int\n"
|
|
" %30 = torch.aten.eq.int %29, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %30 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %27 = torch.aten.__not__ %26 : !torch.bool -> !torch.bool\n"
|
|
" %28 = torch.prim.If %27 -> (!torch.int) {\n"
|
|
" %29 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" %30 = torch.aten.len.t %22 : !torch.list<int> -> !torch.int\n"
|
|
" %31 = torch.aten.eq.int %29, %30 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %31 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %32 = torch.aten.__range_length %int0, %29, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %32, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %35 = torch.aten.__derive_index %arg4, %int0, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.ne.int %35, %8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %36 -> () {\n"
|
|
" %37 = torch.aten.__getitem__.t %16, %35 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.__getitem__.t %22, %35 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.eq.int %37, %38 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %39 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %33 = torch.aten.__getitem__.t %22, %8 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.add.int %arg3, %33 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %34 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%28 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %19 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %20 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %20, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %22 = torch.aten.__getitem__.t %16, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.append.t %19, %22 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %21 = torch.aten._set_item.t %19, %8, %18 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %19 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %15 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.permute(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %5 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %7 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.le.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" %10 = torch.aten.neg.int %9 : !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.sub.int %9, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.lt.int %7, %10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %20 = torch.aten.gt.int %7, %11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" }\n"
|
|
" %14 = torch.aten.__not__ %13 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %15 = torch.aten.lt.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.add.int %7, %9 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" }\n"
|
|
" %17 = torch.aten.append.t %4, %16 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %18 = torch.aten.__getitem__.t %arg0, %16 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.append.t %5, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %6 = torch.aten.__range_length %int1, %3, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %6, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %7 = torch.aten.__derive_index %arg2, %int1, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %7, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %8 = torch.aten.__getitem__.t %4, %7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.__getitem__.t %4, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.ne.int %8, %9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.movedim(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.le.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.list<int>) {\n"
|
|
" torch.prim.If.yield %arg0 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %4 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %5 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %5, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.le.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %25 = torch.prim.If %24 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" %26 = torch.aten.neg.int %25 : !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.sub.int %25, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.lt.int %23, %26 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %29 = torch.prim.If %28 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.gt.int %23, %27 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %45 : !torch.bool\n"
|
|
" }\n"
|
|
" %30 = torch.aten.__not__ %29 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %30 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %31 = torch.aten.lt.int %23, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %32 = torch.prim.If %31 -> (!torch.int) {\n"
|
|
" %45 = torch.aten.add.int %23, %25 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %45 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %23 : !torch.int\n"
|
|
" }\n"
|
|
" %33 = torch.aten.append.t %3, %32 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %34 = torch.aten.__getitem__.t %arg2, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.le.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %36 = torch.prim.If %35 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" %37 = torch.aten.neg.int %36 : !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.sub.int %36, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.lt.int %34, %37 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %40 = torch.prim.If %39 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.gt.int %34, %38 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %45 : !torch.bool\n"
|
|
" }\n"
|
|
" %41 = torch.aten.__not__ %40 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %41 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %42 = torch.aten.lt.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %43 = torch.prim.If %42 -> (!torch.int) {\n"
|
|
" %45 = torch.aten.add.int %34, %36 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %45 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %34 : !torch.int\n"
|
|
" }\n"
|
|
" %44 = torch.aten.append.t %4, %43 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %6 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %0, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.append.t %6, %int-1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %0, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.append.t %7, %arg3 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %8 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %0, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.append.t %8, %arg3 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %9 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %9, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.__getitem__.t %3, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.__getitem__.t %4, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten._set_item.t %6, %24, %23 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %26 = torch.aten.__getitem__.t %3, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten._set_item.t %7, %26, %int-1 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %28 = torch.aten.__getitem__.t %4, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %29 = torch.aten._set_item.t %8, %28, %int-1 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %10 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %11 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %12 = torch.aten.len.t %7 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %12, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.__getitem__.t %7, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.ne.int %23, %int-1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %24 -> () {\n"
|
|
" %25 = torch.aten.append.t %10, %23 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %13 = torch.aten.len.t %8 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %13, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.__getitem__.t %8, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.ne.int %23, %int-1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %24 -> () {\n"
|
|
" %25 = torch.aten.append.t %11, %23 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %14 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.sub.int %0, %14 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %15, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.__getitem__.t %10, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.__getitem__.t %11, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten._set_item.t %6, %24, %23 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %16 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %17 = torch.aten.len.t %6 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %16, %17 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %19 = torch.aten.len.t %6 : !torch.list<int> -> !torch.int\n"
|
|
" %20 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %21 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %19, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.__getitem__.t %6, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.le.int %19, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %25 = torch.prim.If %24 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %19 : !torch.int\n"
|
|
" }\n"
|
|
" %26 = torch.aten.neg.int %25 : !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.sub.int %25, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.lt.int %23, %26 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %29 = torch.prim.If %28 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %36 = torch.aten.gt.int %23, %27 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %36 : !torch.bool\n"
|
|
" }\n"
|
|
" %30 = torch.aten.__not__ %29 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %30 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %31 = torch.aten.lt.int %23, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %32 = torch.prim.If %31 -> (!torch.int) {\n"
|
|
" %36 = torch.aten.add.int %23, %25 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %36 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %23 : !torch.int\n"
|
|
" }\n"
|
|
" %33 = torch.aten.append.t %20, %32 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %34 = torch.aten.__getitem__.t %arg0, %32 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.append.t %21, %34 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %22 = torch.aten.__range_length %int1, %19, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %22, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %23 = torch.aten.__derive_index %arg3, %int1, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %23, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %24 = torch.aten.__getitem__.t %20, %23 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.__getitem__.t %20, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.ne.int %24, %25 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %26 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %21 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.view(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: invalid shape\"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: invalid shape dimensions\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: only one dimension can be inferred\"\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.Loop %0, %true, init(%int1) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.int):\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.mul.int %arg3, %12 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%13 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %2 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.derefine %none : !torch.none to !torch.optional<int>\n"
|
|
" %5:2 = torch.prim.Loop %3, %true, init(%int1, %4) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.optional<int>):\n"
|
|
" %12 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.eq.int %12, %int-1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14:2 = torch.prim.If %13 -> (!torch.int, !torch.optional<int>) {\n"
|
|
" %15 = torch.aten.__isnot__ %arg4, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.derefine %arg2 : !torch.int to !torch.optional<int>\n"
|
|
" torch.prim.If.yield %arg3, %16 : !torch.int, !torch.optional<int>\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.ge.int %15, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.int) {\n"
|
|
" %18 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.mul.int %arg3, %18 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %19 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %17, %arg4 : !torch.int, !torch.optional<int>\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%14#0, %14#1 : !torch.int, !torch.optional<int>)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int, !torch.optional<int>) -> (!torch.int, !torch.optional<int>)\n"
|
|
" %6 = torch.aten.eq.int %1, %5#0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %12 = torch.aten.__isnot__ %5#1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %15 = torch.prim.unchecked_cast %5#1 : !torch.optional<int> -> !torch.int\n"
|
|
" %16 = torch.aten.gt.int %5#0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %16 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.bool) {\n"
|
|
" %15 = torch.prim.unchecked_cast %5#1 : !torch.optional<int> -> !torch.int\n"
|
|
" %16 = torch.aten.remainder.int %1, %5#0 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.eq.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %17 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %14 : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %10 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %10, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %12 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.append.t %9, %12 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %11 = torch.aten.__isnot__ %5#1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" %12 = torch.prim.unchecked_cast %5#1 : !torch.optional<int> -> !torch.int\n"
|
|
" %13 = torch.aten.floordiv.int %1, %5#0 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten._set_item.t %9, %12, %13 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %9 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.infer_size_impl(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: invalid shape\"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: invalid shape dimensions\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: only one dimension can be inferred\"\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.derefine %none : !torch.none to !torch.optional<int>\n"
|
|
" %3:2 = torch.prim.Loop %1, %true, init(%int1, %2) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.optional<int>):\n"
|
|
" %9 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.eq.int %9, %int-1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11:2 = torch.prim.If %10 -> (!torch.int, !torch.optional<int>) {\n"
|
|
" %12 = torch.aten.__isnot__ %arg4, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.derefine %arg2 : !torch.int to !torch.optional<int>\n"
|
|
" torch.prim.If.yield %arg3, %13 : !torch.int, !torch.optional<int>\n"
|
|
" } else {\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.ge.int %12, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.int) {\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.mul.int %arg3, %15 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %16 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %14, %arg4 : !torch.int, !torch.optional<int>\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%11#0, %11#1 : !torch.int, !torch.optional<int>)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int, !torch.optional<int>) -> (!torch.int, !torch.optional<int>)\n"
|
|
" %4 = torch.aten.eq.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.__isnot__ %3#1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" %12 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int\n"
|
|
" %13 = torch.aten.gt.int %3#0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %13 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" %12 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int\n"
|
|
" %13 = torch.aten.remainder.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.eq.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %14 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" }\n"
|
|
" %6 = torch.aten.__not__ %5 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = call @__torch__.torch.jit._shape_functions._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %8 = torch.aten.__isnot__ %3#1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" %9 = torch.prim.unchecked_cast %3#1 : !torch.optional<int> -> !torch.int\n"
|
|
" %10 = torch.aten.floordiv.int %arg1, %3#0 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten._set_item.t %7, %9, %10 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.expand(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.ge.int %0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.list<int>) {\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %8 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %8, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %9 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.append.t %7, %9 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %7 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %8 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %8, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.sub.int %4, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.sub.int %10, %9 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %11 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int-1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" }\n"
|
|
" %17 = torch.aten.ne.int %13, %16 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.eq.int %13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %16 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" }\n"
|
|
" %19 = torch.aten.append.t %7, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.expand_one_unused(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.any) -> !torch.list<int> {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.ge.int %0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.list<int>) {\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %8 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %8, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %9 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.append.t %7, %9 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %7 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %8 = torch.aten.sub.int %3, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %8, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.sub.int %4, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.sub.int %10, %9 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %11 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int-1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" }\n"
|
|
" %17 = torch.aten.ne.int %13, %16 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.eq.int %13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %16 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" }\n"
|
|
" %19 = torch.aten.append.t %7, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.any) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.__is__ %arg1, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %5 = torch.prim.unchecked_cast %arg1 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %6 = torch.aten.len.t %5 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %6, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %7 : !torch.bool\n"
|
|
" }\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.list<int>) {\n"
|
|
" %5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %5, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %7 = torch.aten.append.t %6, %arg4 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %6 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %5 = torch.prim.unchecked_cast %arg1 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %4, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %5 = torch.aten.len.t %3 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.prim.Loop %5, %true, init(%false) {\n"
|
|
" ^bb0(%arg5: !torch.int, %arg6: !torch.bool):\n"
|
|
" %7 = torch.aten.__getitem__.t %3, %arg5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %9 = torch.aten.le.int %8, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %8 : !torch.int\n"
|
|
" }\n"
|
|
" %11 = torch.aten.neg.int %10 : !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.sub.int %10, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.lt.int %7, %11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %20 = torch.aten.gt.int %7, %12 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" }\n"
|
|
" %15 = torch.aten.__not__ %14 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.aten.lt.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.add.int %7, %10 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" }\n"
|
|
" %18 = torch.aten.eq.int %arg4, %17 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg6 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%19 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If %arg2 -> () {\n"
|
|
" %7 = torch.aten.append.t %0, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.append.t %0, %7 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.max_dim(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0 = torch.prim.ListConstruct %arg1 : (!torch.int) -> !torch.list<int>\n"
|
|
" %1 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %2, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %4 = torch.prim.Loop %int1, %true, init(%false) {\n"
|
|
" ^bb0(%arg4: !torch.int, %arg5: !torch.bool):\n"
|
|
" %5 = torch.aten.__getitem__.t %0, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.le.int %6, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %6 : !torch.int\n"
|
|
" }\n"
|
|
" %9 = torch.aten.neg.int %8 : !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.sub.int %8, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.lt.int %5, %9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %18 = torch.aten.gt.int %5, %10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %18 : !torch.bool\n"
|
|
" }\n"
|
|
" %13 = torch.aten.__not__ %12 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %13 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %14 = torch.aten.lt.int %5, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.int) {\n"
|
|
" %18 = torch.aten.add.int %5, %8 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %18 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" %16 = torch.aten.eq.int %arg3, %15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg5 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%17 : !torch.bool)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool) -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If %arg2 -> () {\n"
|
|
" %5 = torch.aten.append.t %1, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %5 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.append.t %1, %5 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %3 = torch.prim.TupleConstruct %1, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %3 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.addmm(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.any, %arg4: !torch.any) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}\"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: self must be a matrix\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: mat2 must be a matrix\"\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: \"\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.eq.int %4, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.prim.ListConstruct %7, %8 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %10 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %11 = torch.prim.max.int %10, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %11, %true, init() {\n"
|
|
" ^bb0(%arg5: !torch.int):\n"
|
|
" %13 = torch.aten.sub.int %11, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.sub.int %13, %arg5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.sub.int %10, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.sub.int %15, %14 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.sub.int %int1, %14 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.ge.int %16, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.int) {\n"
|
|
" %28 = torch.aten.__getitem__.t %arg0, %16 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %28 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %20 = torch.aten.ge.int %17, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %21 = torch.prim.If %20 -> (!torch.int) {\n"
|
|
" %28 = torch.aten.__getitem__.t %9, %17 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %28 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %22 = torch.aten.ne.int %19, %21 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" %28 = torch.aten.ne.int %19, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %28 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %24 = torch.prim.If %23 -> (!torch.bool) {\n"
|
|
" %28 = torch.aten.ne.int %21, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %28 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %24 -> () {\n"
|
|
" %28 = torch.aten.format(%str, %19, %21, %arg5) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %29 = torch.aten.add.str %str_2, %28 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %29, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %25 = torch.aten.eq.int %19, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %21 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %19 : !torch.int\n"
|
|
" }\n"
|
|
" %27 = torch.aten.append.t %12, %26 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %12 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.upsample_nearest2d(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<float>>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: Must specify exactly one of output_size and scale_factors\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: Either output_size or scale_factors must be presented\"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.optional<list<float>>\n"
|
|
" %1 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.append.t %1, %2 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.append.t %1, %4 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %6 = torch.aten.__is__ %arg2, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" %11 = torch.aten.__is__ %arg1, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<float>> -> !torch.list<float>\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__isnot__ %arg1, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.optional<list<float>>) {\n"
|
|
" %11 = torch.prim.unchecked_cast %arg1 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %12 = torch.aten.__is__ %arg2, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.optional<list<float>>) {\n"
|
|
" torch.prim.If.yield %arg2 : !torch.optional<list<float>>\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.optional<list<float>>\n"
|
|
" }\n"
|
|
" %14 = torch.aten.len.t %11 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.aten.__getitem__.t %11, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.append.t %1, %16 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %18 = torch.aten.__getitem__.t %11, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.append.t %1, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %13 : !torch.optional<list<float>>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg2 : !torch.optional<list<float>>\n"
|
|
" }\n"
|
|
" %10 = torch.aten.__isnot__ %9, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" %11 = torch.prim.unchecked_cast %9 : !torch.optional<list<float>> -> !torch.list<float>\n"
|
|
" %12 = torch.aten.__is__ %arg1, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.aten.len.t %11 : !torch.list<float> -> !torch.int\n"
|
|
" %14 = torch.aten.eq.int %13, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %11, %int0 : !torch.list<float>, !torch.int -> !torch.float\n"
|
|
" %17 = torch.operator \"aten.mul.int_float\"(%15, %16) : (!torch.int, !torch.float) -> !torch.float \n"
|
|
" %18 = torch.aten.Int.float %17 : !torch.float -> !torch.int\n"
|
|
" %19 = torch.aten.append.t %1, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.__getitem__.t %11, %int1 : !torch.list<float>, !torch.int -> !torch.float\n"
|
|
" %22 = torch.operator \"aten.mul.int_float\"(%20, %21) : (!torch.int, !torch.float) -> !torch.float \n"
|
|
" %23 = torch.aten.Int.float %22 : !torch.float -> !torch.int\n"
|
|
" %24 = torch.aten.append.t %1, %23 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.argmax(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int9223372036854775807 = torch.constant.int 9223372036854775807\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.list<int>) {\n"
|
|
" %2 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %2 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" %3 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.le.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" %6 = torch.aten.neg.int %5 : !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.sub.int %5, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.lt.int %2, %6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %17 = torch.aten.gt.int %2, %7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %17 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.aten.__not__ %9 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.lt.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.int) {\n"
|
|
" %17 = torch.aten.add.int %2, %5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %17 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" %13 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %14 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.prim.ListConstruct %int9223372036854775807, %14 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %16 = torch.prim.min.self_int %15 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %16, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %17 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %arg3, %12 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %18 -> () {\n"
|
|
" torch.prim.If %arg2 -> () {\n"
|
|
" %19 = torch.aten.append.t %13, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %19 = torch.aten.append.t %13, %17 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %13 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions._reduce_along_dim(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int9223372036854775807 = torch.constant.int 9223372036854775807\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.maybe_wrap_dim(%arg1, %0, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %3 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.prim.ListConstruct %int9223372036854775807, %3 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %5 = torch.prim.min.self_int %4 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %5, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %6 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %arg3, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If %arg2 -> () {\n"
|
|
" %8 = torch.aten.append.t %2, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %8 = torch.aten.append.t %2, %6 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.bmm(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: mismatching contracting dimension\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: mismatching batch dimension\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: bmm only supports 3D tensors\"\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.eq.int %4, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.eq.int %7, %8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %9 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %10 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.__getitem__.t %arg1, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.prim.ListConstruct %10, %11, %12 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %13 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions._shape_as_tensor(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.topk(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"k ({}) is too big for dimension {} of size {}\"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.list<int>) {\n"
|
|
" %4 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %4 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.le.int %arg1, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.format(%str_0, %arg1, %arg2, %9) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %11 = torch.aten.add.str %str, %10 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %11, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %7 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %7, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %9 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.append.t %6, %9 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %8 = torch.aten._set_item.t %6, %arg2, %arg1 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %3 = torch.prim.TupleConstruct %2, %2 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %3 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.nll_loss_forward(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.lt.int %int0, %0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.bool) {\n"
|
|
" %16 = torch.aten.le.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %16 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.le.int %1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" %16 = torch.aten.eq.int %1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %16 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %16, %17 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %18 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %10 = torch.aten.__is__ %arg2, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %16 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %17 = torch.aten.len.t %16 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.__getitem__.t %16, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.eq.int %20, %8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %21 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.eq.int %arg3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %16 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %16 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.list<int>) {\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.prim.ListConstruct %16 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %17 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %9 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %15 = torch.prim.TupleConstruct %14, %9 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %15 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.native_layer_norm(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.tuple<list<int>, list<int>, list<int>> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.sub.int %1, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.ge.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %10 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.append.t %0, %10 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.__range_length %3, %5, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %6, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %10 = torch.aten.append.t %0, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %8 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %8, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %10 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.append.t %7, %10 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %9 = torch.prim.TupleConstruct %7, %0, %0 : !torch.list<int>, !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" return %9 : !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.native_batch_norm(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.optional<list<int>>, %arg5: !torch.bool) -> !torch.tuple<list<int>, list<int>, list<int>> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.If %arg5 -> (!torch.list<int>) {\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct %4 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %5 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %4 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %1 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %2, %true, init() {\n"
|
|
" ^bb0(%arg6: !torch.int):\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %arg6 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.append.t %1, %4 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %3 = torch.prim.TupleConstruct %1, %0, %0 : !torch.list<int>, !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" return %3 : !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions._batch_norm_with_update(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.optional<list<int>>) -> !torch.tuple<list<int>, list<int>, list<int>, list<int>> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0 : (!torch.int) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %3 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg5: !torch.int):\n"
|
|
" %6 = torch.aten.__getitem__.t %arg0, %arg5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.append.t %2, %6 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %4 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>\n"
|
|
" %5 = torch.prim.TupleConstruct %2, %1, %1, %4 : !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>, list<int>, list<int>>\n"
|
|
" return %5 : !torch.tuple<list<int>, list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.cross_entropy_loss(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.float) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.lt.int %int0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" %15 = torch.aten.le.int %1, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.le.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.eq.int %1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" %15 = torch.aten.eq.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.eq.int %15, %16 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %17 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.__is__ %arg2, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %15 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %16 = torch.aten.len.t %15 : !torch.list<int> -> !torch.int\n"
|
|
" %17 = torch.aten.eq.int %16, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.__getitem__.t %15, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.eq.int %19, %9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %18 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.eq.int %arg3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %15 = torch.aten.eq.int %1, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.list<int>) {\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.prim.ListConstruct %15 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %16 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %14 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.broadcast_three(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str = torch.constant.str \"The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.prim.max.int %0, %1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %2, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %8 = torch.aten.sub.int %2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %8, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.sub.int %0, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.sub.int %10, %9 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.sub.int %12, %9 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg0, %11 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %16 = torch.aten.ge.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg1, %13 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %18 = torch.aten.ne.int %15, %17 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" %24 = torch.aten.ne.int %15, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %24 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.bool) {\n"
|
|
" %24 = torch.aten.ne.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %24 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" %24 = torch.aten.format(%str, %15, %17, %arg3) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %25 = torch.aten.add.str %str_0, %24 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %25, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %21 = torch.aten.eq.int %15, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %22 = torch.prim.If %21 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %17 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %15 : !torch.int\n"
|
|
" }\n"
|
|
" %23 = torch.aten.append.t %3, %22 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %4 = torch.aten.len.t %3 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.prim.max.int %4, %5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %6, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %8 = torch.aten.sub.int %6, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %8, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.sub.int %4, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.sub.int %10, %9 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.sub.int %5, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.sub.int %12, %9 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ge.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.__getitem__.t %3, %11 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %16 = torch.aten.ge.int %13, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg2, %13 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %18 = torch.aten.ne.int %15, %17 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" %24 = torch.aten.ne.int %15, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %24 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.bool) {\n"
|
|
" %24 = torch.aten.ne.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %24 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" %24 = torch.aten.format(%str, %15, %17, %arg3) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %25 = torch.aten.add.str %str_0, %24 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %25, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %21 = torch.aten.eq.int %15, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %22 = torch.prim.If %21 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %17 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %15 : !torch.int\n"
|
|
" }\n"
|
|
" %23 = torch.aten.append.t %7, %22 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.broadcast_one_three(%arg0: !torch.list<int>, %arg1: !torch.any, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str = torch.constant.str \"The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.prim.max.int %0, %1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %2, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %4 = torch.aten.sub.int %2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.sub.int %4, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.sub.int %0, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.sub.int %6, %5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %8, %5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.ge.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %7 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %12 = torch.aten.ge.int %9, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.int) {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg2, %9 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.ne.int %11, %13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.ne.int %11, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.ne.int %13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" %20 = torch.aten.format(%str, %11, %13, %arg3) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %21 = torch.aten.add.str %str_0, %20 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %21, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.eq.int %11, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %11 : !torch.int\n"
|
|
" }\n"
|
|
" %19 = torch.aten.append.t %3, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.broadcast_inplace(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"The size of tensor a {} must match the size of tensor b ({}) at non-singleton dimension {}\"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_1 = torch.constant.str \"The dims of tensor b ({}) must be less than or equal tothe dims of tensor a ({}) \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.gt.int %1, %0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" %5 = torch.aten.format(%str_1, %1, %0) : !torch.str, !torch.int, !torch.int -> !torch.str\n"
|
|
" %6 = torch.aten.add.str %str_0, %5 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %6, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop %0, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %5 = torch.aten.sub.int %1, %0 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.add.int %5, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.ge.int %6, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" %12 = torch.aten.__getitem__.t %arg1, %6 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %12 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %10 = torch.aten.ne.int %7, %9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.ne.int %9, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" %12 = torch.aten.format(%str, %7, %9, %arg2) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %13 = torch.aten.add.str %str_0, %12 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %13, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %3 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %4, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %5 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.append.t %3, %5 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.nonzero_lower_bound(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %int0, %0 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch.jit._shape_functions.nonzero_upper_bound(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.Loop %0, %true, init(%int1) {\n"
|
|
" ^bb0(%arg1: !torch.int, %arg2: !torch.int):\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.mul.int %arg2, %4 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%5 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.testing_framework._convert_dtype_to_int(%arg0: !torch.int) -> !torch.int {\n"
|
|
" return %arg0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.triu\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tril\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.torchvision.roi_align\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.bool) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0, %1, %arg3, %arg4 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.torchvision.roi_align\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.float, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.bool) -> !torch.int {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.torchvision.roi_pool\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float, %arg3: !torch.int, %arg4: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0, %1, %arg3, %arg4 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %3 = torch.prim.TupleConstruct %2, %2 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %3 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.torchvision.roi_pool\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.float, %arg3: !torch.int, %arg4: !torch.int) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.torchvision.nms\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.hacky_get_unknown_dimension_size() : () -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0, %1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.hacky_get_unknown_dimension_size() -> !torch.int {\n"
|
|
" %0 = torch.prim.CreateObject !torch.nn.Module<\"__torch__.DummyClassType\">\n"
|
|
" %1 = torch.prim.CallMethod %0[\"__init__\"] () : !torch.nn.Module<\"__torch__.DummyClassType\">, () -> !torch.none\n"
|
|
" %2 = torch.operator \"prim.id\"(%0) : (!torch.nn.Module<\"__torch__.DummyClassType\">) -> !torch.int \n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.DummyClassType.__init__(%arg0: !torch.nn.Module<\"__torch__.DummyClassType\">) -> !torch.none {\n"
|
|
" %none = torch.constant.none\n"
|
|
" return %none : !torch.none\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.torchvision.nms\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.float) -> !torch.int {\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" return %int3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.diagonal\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: diagonal dimensions cannot be identical\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: input must have at least two dimensions\"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int9223372036854775807 = torch.constant.int 9223372036854775807\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.ge.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = call @__torch__.torch.jit._shape_functions.maybe_wrap_dim(%arg2, %2, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = call @__torch__.torch.jit._shape_functions.maybe_wrap_dim(%arg3, %4, %true) : (!torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %6 = torch.aten.ne.int %3, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %8 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %9 = torch.prim.ListConstruct %int9223372036854775807, %8 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %10 = torch.prim.min.self_int %9 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %10, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.eq.int %arg4, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %21 = torch.prim.If %20 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %22 = torch.aten.eq.int %arg4, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %22 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %21 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %22 = torch.aten.append.t %7, %19 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %11 = torch.aten.__getitem__.t %arg0, %3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.sub.int %12, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.prim.min.int %11, %13 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.prim.max.int %14, %int0 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.int) {\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.add.int %19, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.__getitem__.t %arg0, %5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %22 = torch.prim.min.int %20, %21 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %23 = torch.prim.max.int %22, %int0 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %23 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %15 : !torch.int\n"
|
|
" }\n"
|
|
" %18 = torch.aten.append.t %7, %17 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fake_quantize_per_tensor_affine\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fake_quantize_per_tensor_affine_cachemask\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %0, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fake_quantize_per_tensor_affine.tensor_qparams\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.int, %arg4: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._fake_quantize_per_tensor_affine_cachemask_tensor_qparams\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.int, %arg5: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %0, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fake_quantize_per_channel_affine\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fake_quantize_per_channel_affine_cachemask\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %0, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.rad2deg\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sin\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sinh\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.asin\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.asinh\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.cos\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.cosh\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.acos\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.acosh\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tan\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tanh\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.atan\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.atanh\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.erf\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sigmoid\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.hardsigmoid\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.softplus\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.square\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.hardswish\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.silu\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.exp\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.expm1\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.cosine_similarity\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.float) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = torch.aten.slice.t %0, %none, %arg2, %int1 : !torch.list<int>, !torch.none, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %2 = torch.aten.add.int %arg2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.slice.t %0, %2, %none, %int1 : !torch.list<int>, !torch.int, !torch.none, !torch.int -> !torch.list<int>\n"
|
|
" %4 = torch.aten.add.t %1, %3 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.hardtanh\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sqrt\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prims.sqrt\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.neg\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.floor\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sign\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sgn\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.linalg_det\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.aten.eq.int %9, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %10 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %3, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %6, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.list<int>) {\n"
|
|
" %9 = torch.aten.slice.t %arg0, %none, %int1, %int1 : !torch.list<int>, !torch.none, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %9 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %9 = torch.derefine %arg0 : !torch.list<int> to !torch.any\n"
|
|
" %10 = func.call @__torch__.torch.jit._shape_functions.zero_dim_tensor(%9) : (!torch.any) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %10 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %8 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._linalg_det\"(%arg0: !torch.list<int>) -> !torch.tuple<list<int>, list<int>, list<int>> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %0 = call @\"__torch_mlir_shape_fn.aten.linalg_det\"(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = torch.aten.slice.t %arg0, %none, %int-1, %int1 : !torch.list<int>, !torch.none, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %0, %arg0, %1 : !torch.list<int>, !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._linalg_det\"(%arg0: !torch.tuple<int, int>) -> !torch.tuple<int, int, int> {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %2 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.prim.TupleConstruct %0, %1, %2 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" return %3 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.linalg_slogdet\"(%arg0: !torch.list<int>) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.aten.eq.int %9, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %10 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %3, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %6, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.tuple<list<int>, list<int>>) {\n"
|
|
" %9 = torch.aten.slice.t %arg0, %none, %int1, %int1 : !torch.list<int>, !torch.none, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %10 = torch.aten.slice.t %arg0, %none, %int1, %int1 : !torch.list<int>, !torch.none, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %11 = torch.prim.TupleConstruct %9, %10 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" torch.prim.If.yield %11 : !torch.tuple<list<int>, list<int>>\n"
|
|
" } else {\n"
|
|
" %9 = torch.derefine %arg0 : !torch.list<int> to !torch.any\n"
|
|
" %10 = func.call @__torch__.torch.jit._shape_functions.zero_dim_tensor(%9) : (!torch.any) -> !torch.list<int>\n"
|
|
" %11 = torch.prim.TupleConstruct %10, %10 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" torch.prim.If.yield %11 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" return %8 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.detach\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.log2\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.log10\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.log1p\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.logit\"(%arg0: !torch.list<int>, %arg1: !torch.optional<float>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.rsqrt\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.abs\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.reciprocal\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tanh_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.gelu_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.str) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.leaky_relu_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.hardtanh_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float, %arg3: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.ceil\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.trunc\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.log\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.log_sigmoid\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.hann_window.periodic\"(%arg0: !torch.int, %arg1: !torch.bool, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct %arg0 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.hardshrink\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.softshrink\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.mish\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.relu\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.relu6\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.round\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.glu\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: glu's dim size must be multiply of 2\"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %13 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %14 = torch.aten.add.int %arg1, %13 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.remainder.int %2, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.slice.t %arg0, %none, %1, %int1 : !torch.list<int>, !torch.none, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %6 = torch.aten.__getitem__.t %arg0, %1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.floordiv.int %6, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %8 = torch.prim.ListConstruct %7 : (!torch.int) -> !torch.list<int>\n"
|
|
" %9 = torch.aten.add.t %5, %8 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" %10 = torch.aten.add.int %1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.slice.t %arg0, %10, %none, %int1 : !torch.list<int>, !torch.int, !torch.none, !torch.int -> !torch.list<int>\n"
|
|
" %12 = torch.aten.add.t %9, %11 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" return %12 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._softmax\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.softmax.int\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._log_softmax\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.log_softmax.int\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.clamp\"(%arg0: !torch.list<int>, %arg1: !torch.optional<float>, %arg2: !torch.optional<float>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.clamp.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<int>>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.clamp_min\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.clamp_min.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.clamp_max\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.rsub.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.quantize_per_channel\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.int, %arg4: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.quantize_per_tensor\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.int, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.dequantize.self\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.dequantize.tensor\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.int_repr\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._make_per_channel_quantized_tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._make_per_tensor_quantized_tensor\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prims.convert_element_type\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.grid_sampler\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.bool) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.__getitem__.t %arg1, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.prim.ListConstruct %0, %1, %2, %3 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.__interpolate.size_list_scale_list\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<float>>, %arg3: !torch.str, %arg4: !torch.optional<bool>, %arg5: !torch.optional<bool>, %arg6: !torch.bool) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: Either size or scale_factor must be presented\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: Must specify exactly one of size and scale_factor\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.list<int>\n"
|
|
" %1 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = torch.aten.__isnot__ %arg1, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %5:2 = torch.prim.If %4 -> (!torch.bool, !torch.list<int>) {\n"
|
|
" %7 = torch.prim.unchecked_cast %arg1 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %8 = torch.aten.__is__ %arg2, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__getitem__.t %7, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.append.t %3, %9 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %11 = torch.aten.__getitem__.t %7, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.append.t %3, %11 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %true, %3 : !torch.bool, !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %7 = torch.aten.__isnot__ %arg2, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" %8:2 = torch.prim.If %7 -> (!torch.bool, !torch.list<int>) {\n"
|
|
" %9 = torch.prim.unchecked_cast %arg2 : !torch.optional<list<float>> -> !torch.list<float>\n"
|
|
" %10 = torch.aten.__is__ %arg1, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.__getitem__.t %9, %int0 : !torch.list<float>, !torch.int -> !torch.float\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.operator \"aten.mul.float_int\"(%11, %12) : (!torch.float, !torch.int) -> !torch.float \n"
|
|
" %14 = torch.aten.Int.float %13 : !torch.float -> !torch.int\n"
|
|
" %15 = torch.aten.append.t %3, %14 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %16 = torch.aten.__getitem__.t %9, %int1 : !torch.list<float>, !torch.int -> !torch.float\n"
|
|
" %17 = torch.aten.__getitem__.t %arg0, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %18 = torch.operator \"aten.mul.float_int\"(%16, %17) : (!torch.float, !torch.int) -> !torch.float \n"
|
|
" %19 = torch.aten.Int.float %18 : !torch.float -> !torch.int\n"
|
|
" %20 = torch.aten.append.t %3, %19 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %true, %3 : !torch.bool, !torch.list<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false, %0 : !torch.bool, !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %8#0, %8#1 : !torch.bool, !torch.list<int>\n"
|
|
" }\n"
|
|
" %6 = torch.prim.If %5#0 -> (!torch.list<int>) {\n"
|
|
" torch.prim.If.yield %5#1 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prims.collapse\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %str = torch.constant.str \"AssertionError: start must be less than or equal to end\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: end out of bounds\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: start out of bounds\"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.lt.int %arg1, %0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.lt.int %arg2, %2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.ge.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.ge.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.le.int %arg1, %arg2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %arg1, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.append.t %7, %15 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %8 = torch.aten.add.int %arg2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.__range_length %arg1, %8, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.prim.Loop %9, %true, init(%int1) {\n"
|
|
" ^bb0(%arg3: !torch.int, %arg4: !torch.int):\n"
|
|
" %15 = torch.aten.__derive_index %arg3, %arg1, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %15 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.mul.int %arg4, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter(%17 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" %11 = torch.aten.append.t %7, %10 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %12 = torch.aten.add.int %arg2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %14 = torch.aten.__range_length %12, %13, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %14, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %15 = torch.aten.__derive_index %arg3, %12, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %15 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.append.t %7, %16 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prims.split_dim\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %str = torch.constant.str \"AssertionError: 'outer_length' must divide the size of the dimension, a[dim]\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: 'outer_length' must be positive\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: 'dim' must be less than the rank of the tensor\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: 'dim' must be non-negative\"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.ge.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %0 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.lt.int %arg1, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.gt.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.remainder.int %4, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.eq.int %5, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %arg1, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.append.t %7, %15 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %8 = torch.aten.append.t %7, %arg2 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %9 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.floordiv.int %9, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.append.t %7, %10 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %12 = torch.aten.add.int %arg1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %14 = torch.aten.__range_length %12, %13, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %14, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %15 = torch.aten.__derive_index %arg3, %12, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %15 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.append.t %7, %16 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.to.dtype\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool, %arg3: !torch.bool, %arg4: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.to.dtype_layout\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.bool, %arg6: !torch.bool, %arg7: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.to.device\"(%arg0: !torch.list<int>, %arg1: !torch.Device, %arg2: !torch.int, %arg3: !torch.bool, %arg4: !torch.bool, %arg5: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.to.other\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.bool, %arg4: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._cast_Float\"(%arg0: !torch.list<int>, %arg1: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._cast_Long\"(%arg0: !torch.list<int>, %arg1: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.type_as\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.dropout\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.native_dropout\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.optional<bool>) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = torch.prim.TupleConstruct %0, %0 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %1 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.gelu\"(%arg0: !torch.list<int>, %arg1: !torch.str) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bucketize.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.contiguous\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.clone\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.lift_fresh_copy\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.linalg_cross\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"the size of first tensor ({}) must match the size of second tensor ({}) at dimension {}\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: inputs must have the same number of dimensions\"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %3, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %5 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %6 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %5, %6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %10 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.eq.int %10, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" }\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %10 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.eq.int %10, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %9 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %10 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.format(%str_0, %10, %11, %arg3) : !torch.str, !torch.int, !torch.int, !torch.int -> !torch.str\n"
|
|
" %13 = torch.aten.add.str %str, %12 : !torch.str, !torch.str -> !torch.str\n"
|
|
" torch.prim.RaiseException %13, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %4 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.kthvalue\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = torch.derefine %arg2 : !torch.int to !torch.optional<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.argmax(%arg0, %0, %arg3) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %1, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._log_softmax_backward_data\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.isnan\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.isinf\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.isneginf\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.isposinf\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.ne.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.eq.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.ne.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.gt.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.ge.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.le.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.lt.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.add.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sub.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.mul.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.div.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.remainder.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.__and__.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.remainder.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fmod.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.floor_divide.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.pow.Scalar\"(%arg0: !torch.float, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg1) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.pow.Tensor_Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.pow.Tensor_Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.leaky_relu\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.elu\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float, %arg3: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.prelu\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.celu\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.rrelu\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float, %arg3: !torch.bool, %arg4: !torch.any) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.selu\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.gather\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg2) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.layer_norm\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.float, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._softmax_backward_data\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg1) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.any\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.all\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.min\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.min.other\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max.other\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sum\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.prod\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.mean\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.var\"(%arg0: !torch.list<int>, %arg1: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prims.var\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<float>, %arg3: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %false, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.var.dim\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %arg3, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.var.correction\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<float>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %arg3, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.var_mean.correction\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<float>, %arg3: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %arg3, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %1, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.var_mean.dim\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %arg3, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %1, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.var_mean.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.var_mean\"(%arg0: !torch.list<int>, %arg1: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %0, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.std\"(%arg0: !torch.list<int>, %arg1: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.std.dim\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %arg3, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.std.correction\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<float>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %arg3, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.trace\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: input must have rank 2\"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.argmax\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.patched_argmax_shape_func(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.patched_argmax_shape_func(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %arg2 : !torch.bool\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.list<int>) {\n"
|
|
" %3 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %4, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %5 = torch.aten.append.t %3, %int1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %3 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %3 = func.call @__torch__.torch.jit._shape_functions.argmax(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.argmin\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.patched_argmax_shape_func(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.one_hot\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: getting num_classes from tensor contents is not supported\"\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %0 = torch.aten.ne.int %arg1, %int-1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %0 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %1 = torch.prim.ListConstruct %arg1 : (!torch.int) -> !torch.list<int>\n"
|
|
" %2 = torch.aten.add.t %arg0, %1 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.any.dim\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg1 : !torch.int to !torch.optional<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.argmax(%arg0, %0, %arg2) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.all.dim\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg1 : !torch.int to !torch.optional<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.argmax(%arg0, %0, %arg2) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max.dim\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = torch.derefine %arg1 : !torch.int to !torch.optional<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.argmax(%arg0, %0, %arg2) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %1, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.min.dim\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = torch.derefine %arg1 : !torch.int to !torch.optional<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.argmax(%arg0, %0, %arg2) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %1, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.amax\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %arg1 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %1 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %2 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %0, %arg2, %1) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.amin\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %arg1 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %1 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %2 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %0, %arg2, %1) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.aminmax\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.patched_argmax_shape_func(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.optional<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" %1 = torch.prim.TupleConstruct %0, %0 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %1 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.mean.dim\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg3 : !torch.optional<int> to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %arg2, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sum.dim_IntList\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg3 : !torch.optional<int> to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg1, %arg2, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.prod.dim_int\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct %arg1 : (!torch.int) -> !torch.list<int>\n"
|
|
" %1 = torch.derefine %0 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %2 = torch.derefine %arg3 : !torch.optional<int> to !torch.any\n"
|
|
" %3 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %1, %arg2, %2) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.pixel_shuffle\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %str = torch.constant.str \"AssertionError: number of input channels must be divisible by upscale_factor^2 in pixel_shuffle\"\n"
|
|
" %int-3 = torch.constant.int -3\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: input must be at least rank-3 in pixel_shuffle\"\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.ge.int %0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.mul.int %arg1, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.remainder.int %3, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.slice.t %arg0, %int0, %int-3, %int1 : !torch.list<int>, !torch.int, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %7 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.floordiv.int %7, %2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.append.t %6, %8 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %10 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.mul.int %10, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.append.t %6, %11 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.mul.int %13, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.append.t %6, %14 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" return %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.permute\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.permute(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.movedim.int\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct %arg1 : (!torch.int) -> !torch.list<int>\n"
|
|
" %1 = torch.prim.ListConstruct %arg2 : (!torch.int) -> !torch.list<int>\n"
|
|
" %2 = call @__torch__.torch.jit._shape_functions.movedim(%arg0, %0, %1) : (!torch.list<int>, !torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.movedim.int\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.transpose.int\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.transpose(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.t\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.transpose(%arg0, %int0, %int1) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.numpy_T\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %1, %true, init() {\n"
|
|
" ^bb0(%arg1: !torch.int):\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.aten.insert.t %0, %int0, %2 : !torch.list<int>, !torch.int, !torch.int\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.dot\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.matmul\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.matmul(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.mv\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.mv(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.mm\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.mm(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._int_mm\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.mm(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.addmm\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.float, %arg4: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg3 : !torch.float to !torch.any\n"
|
|
" %1 = torch.derefine %arg4 : !torch.float to !torch.any\n"
|
|
" %2 = call @__torch__.torch.jit._shape_functions.addmm(%arg0, %arg1, %arg2, %0, %1) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.any, !torch.any) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bmm\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.bmm(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.baddbmm\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.float, %arg4: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.bmm(%arg1, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.embedding\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.bool, %arg4: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.embedding(%arg0, %arg1, %arg2, %arg3, %arg4) : (!torch.list<int>, !torch.list<int>, !torch.int, !torch.bool, !torch.bool) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.repeat\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.ge.int %0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.list<int>) {\n"
|
|
" %7 = func.call @__torch__.torch.jit._shape_functions._copy(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %7 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %8 = torch.aten.sub.int %3, %4 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %8, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %9 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.append.t %7, %9 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.Loop %4, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %9 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.add.int %arg2, %8 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.__getitem__.t %arg1, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.mul.int %9, %11 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.append.t %7, %12 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.repeat_interleave.self_int\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.list<int>) {\n"
|
|
" %2 = func.call @__torch__.torch.jit._shape_functions.flatten(%arg0, %int0, %int-1) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %3 = torch.aten.__getitem__.t %2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.mul.int %3, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct %4 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %5 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" %3 = torch.aten.slice.t %arg0, %none, %2, %int1 : !torch.list<int>, !torch.none, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %4 = torch.aten.__getitem__.t %arg0, %2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.mul.int %4, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.prim.ListConstruct %5 : (!torch.int) -> !torch.list<int>\n"
|
|
" %7 = torch.aten.add.t %3, %6 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" %8 = torch.aten.add.int %2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.slice.t %arg0, %8, %none, %int1 : !torch.list<int>, !torch.int, !torch.none, !torch.int -> !torch.list<int>\n"
|
|
" %10 = torch.aten.add.t %7, %9 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %10 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tile\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.lt.int %0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.list<int>) {\n"
|
|
" %5 = torch.prim.ListConstruct %int1 : (!torch.int) -> !torch.list<int>\n"
|
|
" %6 = torch.aten.sub.int %1, %0 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %7 = torch.operator \"aten.mul.left_t\"(%5, %6) : (!torch.list<int>, !torch.int) -> !torch.list<int> \n"
|
|
" %8 = torch.aten.add.t %7, %arg1 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %8 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %4 = call @\"__torch_mlir_shape_fn.aten.repeat\"(%arg0, %3) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.roll\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.expand\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.expand(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.expand_as\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg1) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.broadcast_to\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.expand(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.view\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.view(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.reshape\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.view(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.reshape_as\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.view(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._reshape_alias\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.view(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._unsafe_view\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.resize_\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max_pool2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.max_pool2d(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max_pool3d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__._max_pool3d(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__._max_pool3d(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int-3 = torch.constant.int -3\n"
|
|
" %int-4 = torch.constant.int -4\n"
|
|
" %int-5 = torch.constant.int -5\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: max_pool3d: dilation must be either a single int, or a tuple of three ints\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: max_pool3d: padding must either be a single int, or a tuple of thee ints\"\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: max_pool3d: stride must either be omitted, a single int, or a tuple of three ints\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_3 = torch.constant.str \"AssertionError: max_pool3d: kernel_size must either be a single int, or a tuple of three ints\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %46 = torch.aten.eq.int %45, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %46 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %3, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.tuple<int, int, int>) {\n"
|
|
" %45 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.prim.TupleConstruct %45, %46, %47 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %48 : !torch.tuple<int, int, int>\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg1, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.prim.TupleConstruct %45, %46, %47 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %48 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" %6:3 = torch.prim.TupleUnpack %5 : !torch.tuple<int, int, int> -> !torch.int, !torch.int, !torch.int\n"
|
|
" %7 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %46 = torch.aten.eq.int %45, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %46 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %46 = torch.aten.eq.int %45, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %46 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13:3 = torch.prim.If %12 -> (!torch.int, !torch.int, !torch.int) {\n"
|
|
" torch.prim.If.yield %6#0, %6#0, %6#0 : !torch.int, !torch.int, !torch.int\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %46 = torch.aten.eq.int %45, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %47:3 = torch.prim.If %46 -> (!torch.int, !torch.int, !torch.int) {\n"
|
|
" %48 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %49 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %50 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %48, %49, %50 : !torch.int, !torch.int, !torch.int\n"
|
|
" } else {\n"
|
|
" %48 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %49 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %50 = torch.aten.__getitem__.t %arg2, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %48, %49, %50 : !torch.int, !torch.int, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %47#0, %47#1, %47#2 : !torch.int, !torch.int, !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %46 = torch.aten.eq.int %45, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %46 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.tuple<int, int, int>) {\n"
|
|
" %45 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.prim.TupleConstruct %45, %46, %47 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %48 : !torch.tuple<int, int, int>\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.__getitem__.t %arg3, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg3, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.prim.TupleConstruct %45, %46, %47 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %48 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" %20:3 = torch.prim.TupleUnpack %19 : !torch.tuple<int, int, int> -> !torch.int, !torch.int, !torch.int\n"
|
|
" %21 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %22 = torch.aten.eq.int %21, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %46 = torch.aten.eq.int %45, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %46 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %24 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.tuple<int, int, int>) {\n"
|
|
" %45 = torch.aten.__getitem__.t %arg4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.__getitem__.t %arg4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.prim.TupleConstruct %45, %46, %47 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %48 : !torch.tuple<int, int, int>\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.__getitem__.t %arg4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.__getitem__.t %arg4, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.__getitem__.t %arg4, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %48 = torch.prim.TupleConstruct %45, %46, %47 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %48 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" %27:3 = torch.prim.TupleUnpack %26 : !torch.tuple<int, int, int> -> !torch.int, !torch.int, !torch.int\n"
|
|
" %28 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %29 = torch.aten.eq.int %28, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %30 = torch.prim.If %29 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %45 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %46 = torch.aten.eq.int %45, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %46 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %30 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %31 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %32 = torch.aten.eq.int %31, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %33 = torch.prim.If %32 -> (!torch.int) {\n"
|
|
" %45 = torch.aten.__getitem__.t %arg0, %int-5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %45 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %34 = torch.aten.__getitem__.t %arg0, %int-4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %36 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%35, %6#0, %20#0, %13#0, %27#0, %arg5) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %39 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%36, %6#1, %20#1, %13#1, %27#1, %arg5) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %40 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%37, %6#2, %20#2, %13#2, %27#2, %arg5) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %41 = call @__torch__._pool3d_shape_check(%arg0, %6#0, %6#1, %6#2, %13#0, %13#1, %13#2, %20#0, %20#1, %20#2, %27#0, %27#1, %27#2, %38, %39, %40) : (!torch.list<int>, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.none\n"
|
|
" %42 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %43 = torch.aten.eq.int %42, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %44 = torch.prim.If %43 -> (!torch.list<int>) {\n"
|
|
" %45 = torch.prim.ListConstruct %34, %38, %39, %40 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %45 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %45 = torch.prim.ListConstruct %33, %34, %38, %39, %40 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %45 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %44 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__._pool3d_shape_check(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.int, %arg7: !torch.int, %arg8: !torch.int, %arg9: !torch.int, %arg10: !torch.int, %arg11: !torch.int, %arg12: !torch.int, %arg13: !torch.int, %arg14: !torch.int, %arg15: !torch.int) -> !torch.none {\n"
|
|
" %str = torch.constant.str \"AssertionError: pool3d: input dimensions must be 4 or 5\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.gt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.gt.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.gt.int %arg3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.gt.int %arg4, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.gt.int %arg5, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.gt.int %arg6, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.gt.int %arg10, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.gt.int %arg11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.gt.int %arg12, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %9 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %10 = torch.aten.eq.int %0, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %20 = torch.aten.eq.int %0, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.eq.int %0, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.ne.int %20, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %22 = torch.prim.If %21 -> (!torch.bool) {\n"
|
|
" %25 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.ne.int %25, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %26 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" %25 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.ne.int %25, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %26 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %24 = torch.prim.If %23 -> (!torch.bool) {\n"
|
|
" %25 = torch.aten.__getitem__.t %arg0, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.ne.int %25, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %26 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %24 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %20 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.ne.int %20, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %22 = torch.prim.If %21 -> (!torch.bool) {\n"
|
|
" %26 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.ne.int %26, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %27 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" %26 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.ne.int %26, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %27 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %24 = torch.prim.If %23 -> (!torch.bool) {\n"
|
|
" %26 = torch.aten.__getitem__.t %arg0, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.ne.int %26, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %27 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %25 = torch.prim.If %24 -> (!torch.bool) {\n"
|
|
" %26 = torch.aten.__getitem__.t %arg0, %int4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %27 = torch.aten.ne.int %26, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %27 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %25 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.aten.floordiv.int %arg1, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.ge.int %13, %arg7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.floordiv.int %arg3, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.ge.int %20, %arg9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %21 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.floordiv.int %arg2, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.ge.int %20, %arg8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %21 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.ge.int %arg13, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.ge.int %arg15, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" %20 = torch.aten.ge.int %arg14, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %19 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %none : !torch.none\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max_pool2d_with_indices\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.max_pool2d(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" %1 = torch.prim.TupleConstruct %0, %0 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %1 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max_pool2d_with_indices_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max_unpool3d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: Input and indices must be of the same rank\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: output_size must have 3 elements\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: Input be of rank 4 or 5\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %3, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %5, %6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %9 = torch.aten.eq.int %8, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.list<int>) {\n"
|
|
" %11 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.__getitem__.t %arg2, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.prim.ListConstruct %11, %12, %13, %14, %15 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %16 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %arg2, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.prim.ListConstruct %11, %12, %13, %14 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %15 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %10 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.upsample_nearest2d_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.optional<float>, %arg4: !torch.optional<float>) -> !torch.list<int> {\n"
|
|
" return %arg2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.avg_pool1d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.pool1d(%arg0, %arg1, %arg2, %arg3, %arg4) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.pool1d(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int-3 = torch.constant.int -3\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: pool1d: padding must be a single int\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: pool1d: stride must either be omitted, or a single int\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: pool1d: kernel_size must be a single int\"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %25 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %6, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" }\n"
|
|
" %9 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.aten.eq.int %9, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %13 = torch.aten.eq.int %12, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %25 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %15 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %16 = torch.aten.eq.int %15, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %18 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%19, %2, %11, %8, %int1, %arg4) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %21 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %22 = torch.aten.eq.int %21, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.list<int>) {\n"
|
|
" %24 = torch.prim.ListConstruct %18, %20 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %24 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %24 = torch.prim.ListConstruct %17, %18, %20 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %24 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %23 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.max_pool1d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.pool1d(%arg0, %arg1, %arg2, %arg3, %arg5) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.adaptive_avg_pool1d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.adaptive_avg_pool1d(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.adaptive_avg_pool1d(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %5, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %11 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.ne.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %6 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %7 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.sub.int %7, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %8, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %11 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.append.t %6, %11 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %9 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.append.t %6, %9 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" return %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.avg_pool2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool, %arg5: !torch.bool, %arg6: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.avg_pool2d(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.bool, !torch.optional<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.avg_pool2d(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool, %arg5: !torch.bool, %arg6: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int-3 = torch.constant.int -3\n"
|
|
" %int-4 = torch.constant.int -4\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: avg_pool2d: padding must be either be a single int, or a tuple of two ints\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: avg_pool2d: stride must either be omitted, a single int, or a tuple of two ints\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: avg_pool2d: kernel_size must either be a single int, or a tuple of two ints\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %39, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %40 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %39 : !torch.int\n"
|
|
" }\n"
|
|
" %7 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %39, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %40 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %39, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %40 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %39 : !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %39, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %41 = torch.prim.If %40 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %13 : !torch.int\n"
|
|
" } else {\n"
|
|
" %42 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %42 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %41 : !torch.int\n"
|
|
" }\n"
|
|
" %17 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %39, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %40 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %19 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %20 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %22 = torch.aten.eq.int %21, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.__getitem__.t %arg3, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %39 : !torch.int\n"
|
|
" }\n"
|
|
" %24 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %39 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %40 = torch.aten.eq.int %39, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %40 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %26 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %27 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %28 = torch.aten.eq.int %27, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %29 = torch.prim.If %28 -> (!torch.int) {\n"
|
|
" %39 = torch.aten.__getitem__.t %arg0, %int-4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %39 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %30 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %31 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %33 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%31, %3, %20, %13, %int1, %arg4) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %34 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%32, %6, %23, %16, %int1, %arg4) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %35 = call @__torch__.torch.jit._shape_functions.pool2d_shape_check(%arg0, %3, %6, %13, %16, %20, %23, %int1, %int1, %30, %31, %32, %33, %34) : (!torch.list<int>, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.none\n"
|
|
" %36 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %37 = torch.aten.eq.int %36, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %38 = torch.prim.If %37 -> (!torch.list<int>) {\n"
|
|
" %39 = torch.prim.ListConstruct %30, %33, %34 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %39 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %39 = torch.prim.ListConstruct %29, %30, %33, %34 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %39 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %38 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.avg_pool3d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool, %arg5: !torch.bool, %arg6: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.avg_pool3d(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.bool, !torch.optional<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.avg_pool3d(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool, %arg5: !torch.bool, %arg6: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %int-3 = torch.constant.int -3\n"
|
|
" %int-4 = torch.constant.int -4\n"
|
|
" %int-5 = torch.constant.int -5\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: max_pool3d: padding must either be a single int, or a tuple of thee ints\"\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: max_pool3d: stride must either be omitted, a single int, or a tuple of three ints\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: max_pool3d: kernel_size must either be a single int, or a tuple of three ints\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %38 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %39 = torch.aten.eq.int %38, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %39 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %3, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.tuple<int, int, int>) {\n"
|
|
" %38 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %41 = torch.prim.TupleConstruct %38, %39, %40 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %41 : !torch.tuple<int, int, int>\n"
|
|
" } else {\n"
|
|
" %38 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.__getitem__.t %arg1, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %41 = torch.prim.TupleConstruct %38, %39, %40 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %41 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" %6:3 = torch.prim.TupleUnpack %5 : !torch.tuple<int, int, int> -> !torch.int, !torch.int, !torch.int\n"
|
|
" %7 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %38 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %39 = torch.aten.eq.int %38, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %39 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %38 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %39 = torch.aten.eq.int %38, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %39 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13:3 = torch.prim.If %12 -> (!torch.int, !torch.int, !torch.int) {\n"
|
|
" torch.prim.If.yield %6#0, %6#0, %6#0 : !torch.int, !torch.int, !torch.int\n"
|
|
" } else {\n"
|
|
" %38 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %39 = torch.aten.eq.int %38, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %40:3 = torch.prim.If %39 -> (!torch.int, !torch.int, !torch.int) {\n"
|
|
" %41 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %41, %42, %43 : !torch.int, !torch.int, !torch.int\n"
|
|
" } else {\n"
|
|
" %41 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.__getitem__.t %arg2, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %41, %42, %43 : !torch.int, !torch.int, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %40#0, %40#1, %40#2 : !torch.int, !torch.int, !torch.int\n"
|
|
" }\n"
|
|
" %14 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %15 = torch.aten.eq.int %14, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %38 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %39 = torch.aten.eq.int %38, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %39 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %16 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %17 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %18 = torch.aten.eq.int %17, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %19 = torch.prim.If %18 -> (!torch.tuple<int, int, int>) {\n"
|
|
" %38 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %41 = torch.prim.TupleConstruct %38, %39, %40 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %41 : !torch.tuple<int, int, int>\n"
|
|
" } else {\n"
|
|
" %38 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg3, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.__getitem__.t %arg3, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %41 = torch.prim.TupleConstruct %38, %39, %40 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" torch.prim.If.yield %41 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" %20:3 = torch.prim.TupleUnpack %19 : !torch.tuple<int, int, int> -> !torch.int, !torch.int, !torch.int\n"
|
|
" %21 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %22 = torch.aten.eq.int %21, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %38 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %39 = torch.aten.eq.int %38, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %39 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %24 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.int) {\n"
|
|
" %38 = torch.aten.__getitem__.t %arg0, %int-5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %38 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" }\n"
|
|
" %27 = torch.aten.__getitem__.t %arg0, %int-4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.__getitem__.t %arg0, %int-3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %29 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %31 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%28, %6#0, %20#0, %13#0, %int1, %arg4) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %32 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%29, %6#1, %20#1, %13#1, %int1, %arg4) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %33 = call @__torch__.torch.jit._shape_functions.pooling_output_shape(%30, %6#2, %20#2, %13#2, %int1, %arg4) : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.bool) -> !torch.int\n"
|
|
" %34 = call @__torch__._pool3d_shape_check(%arg0, %6#0, %6#1, %6#2, %13#0, %13#1, %13#2, %20#0, %20#1, %20#2, %int1, %int1, %int1, %31, %32, %33) : (!torch.list<int>, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.none\n"
|
|
" %35 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %36 = torch.aten.eq.int %35, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %37 = torch.prim.If %36 -> (!torch.list<int>) {\n"
|
|
" %38 = torch.prim.ListConstruct %27, %31, %32, %33 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %38 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %38 = torch.prim.ListConstruct %26, %27, %31, %32, %33 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %38 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %37 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.adaptive_avg_pool2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.adaptive_avg_pool2d(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.adaptive_max_pool1d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = call @__torch__.adaptive_pool(%arg0, %arg1, %int1) : (!torch.list<int>, !torch.list<int>, !torch.int) -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__.adaptive_pool(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %arg2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.add.int %arg2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %2, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %12 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %13 = torch.aten.add.int %arg2, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.eq.int %12, %13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %14 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %6, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.ne.int %12, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %13 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %7 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %8 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %8, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %9, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.append.t %7, %12 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %10 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %10, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %12 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.append.t %7, %12 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %11 = torch.prim.TupleConstruct %7, %7 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %11 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.adaptive_max_pool2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = call @__torch__.adaptive_pool(%arg0, %arg1, %int2) : (!torch.list<int>, !torch.list<int>, !torch.int) -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.adaptive_max_pool3d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = call @__torch__.adaptive_pool(%arg0, %arg1, %int3) : (!torch.list<int>, !torch.list<int>, !torch.int) -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.adaptive_avg_pool3d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = call @__torch__.adaptive_pool(%arg0, %arg1, %int3) : (!torch.list<int>, !torch.list<int>, !torch.int) -> !torch.tuple<list<int>, list<int>>\n"
|
|
" %1 = torch.prim.TupleIndex %0, %int0 : !torch.tuple<list<int>, list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.flatten.using_ints\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.flatten(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.unflatten.int\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.lt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %10 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %11 = torch.aten.add.int %arg1, %10 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %11 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %2 : (!torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch.jit._shape_functions.view(%3, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" %5 = torch.aten.slice.t %arg0, %none, %1, %int1 : !torch.list<int>, !torch.none, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" %6 = torch.aten.add.t %5, %4 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" %7 = torch.aten.add.int %1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.slice.t %arg0, %7, %none, %int1 : !torch.list<int>, !torch.int, !torch.none, !torch.int -> !torch.list<int>\n"
|
|
" %9 = torch.aten.add.t %6, %8 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" return %9 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.linear\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.linear(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.scaled_dot_product_attention\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.optional<list<int>>, %arg4: !torch.float, %arg5: !torch.bool, %arg6: !torch.optional<float>) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %0 = torch.aten.__getitem__.t %arg2, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.aten._set_item.t %arg0, %int-1, %0 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.zeros\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.eye\"(%arg0: !torch.int, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct %arg0, %arg0 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.eye.m\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct %arg0, %arg1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.ones\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.empty.memory_format\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.empty_strided\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.full\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.full_like\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>, %arg6: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.new_full\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.zeros_like\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.ones_like\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.empty_like\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.new_zeros\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.new_ones\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.new_empty\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.new_empty_strided\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.diag_embed\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__._diag_embed_shape_helper(%arg0, %arg1, %arg2, %arg3) : (!torch.list<int>, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__._diag_embed_shape_helper(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.add.int %0, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.ne.int %arg2, %arg3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.lt.int %arg2, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.neg.int %1 : !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.ge.int %arg2, %4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.lt.int %arg3, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.neg.int %1 : !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.ge.int %arg3, %7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.lt.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" %15 = torch.aten.add.int %1, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %15 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg2 : !torch.int\n"
|
|
" }\n"
|
|
" %11 = torch.aten.lt.int %arg3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.int) {\n"
|
|
" %15 = torch.aten.add.int %1, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %15 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.int\n"
|
|
" }\n"
|
|
" %13 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %14 = torch.prim.Loop %1, %true, init(%int0) {\n"
|
|
" ^bb0(%arg4: !torch.int, %arg5: !torch.int):\n"
|
|
" %15 = torch.prim.ListConstruct %10, %12 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %16 = torch.aten.__contains__.int_list %15, %arg4 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.int) {\n"
|
|
" %18 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.operator \"prim.abs.int\"(%arg1) : (!torch.int) -> !torch.int \n"
|
|
" %20 = torch.aten.add.int %18, %19 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.append.t %13, %20 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %arg5 : !torch.int\n"
|
|
" } else {\n"
|
|
" %18 = torch.aten.__getitem__.t %arg0, %arg5 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.append.t %13, %18 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %20 = torch.aten.add.int %arg5, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%17 : !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.int) -> !torch.int\n"
|
|
" return %13 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._to_copy\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.bool, %arg6: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.masked_fill.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.masked_fill.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.zero\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fill.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fill.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.copy\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.uniform\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float, %arg3: !torch.any) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.exponential\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.any) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.rand\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bernoulli.float\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.any) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bernoulli.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.any) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bernoulli.p\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.any) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._index_put_impl\"(%arg0: !torch.list<int>, %arg1: !torch.list<optional<list<int>>>, %arg2: !torch.list<int>, %arg3: !torch.bool, %arg4: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bernoulli\"(%arg0: !torch.list<int>, %arg1: !torch.any) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.multinomial\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool, %arg3: !torch.any) -> !torch.list<int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %6 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %6, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %7 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %3, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.list<int>) {\n"
|
|
" %6 = torch.prim.ListConstruct %arg1 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %6 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %6 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.prim.ListConstruct %6, %arg1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.cumsum\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.rand_like\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.randn_like\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.randint.low\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.list<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.randint\"(%arg0: !torch.int, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.randn\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.randn.generator\"(%arg0: !torch.list<int>, %arg1: !torch.any, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.normal_functional\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float, %arg3: !torch.any) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.arange.start_step\"(%arg0: !torch.float, %arg1: !torch.float, %arg2: !torch.float, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg0 : !torch.float to !torch.union<float, int>\n"
|
|
" %1 = torch.derefine %arg1 : !torch.float to !torch.union<float, int>\n"
|
|
" %2 = torch.derefine %arg2 : !torch.float to !torch.union<float, int>\n"
|
|
" %3 = torch.derefine %arg3 : !torch.optional<int> to !torch.any\n"
|
|
" %4 = torch.derefine %arg4 : !torch.optional<int> to !torch.any\n"
|
|
" %5 = torch.derefine %arg5 : !torch.optional<Device> to !torch.any\n"
|
|
" %6 = torch.derefine %arg6 : !torch.optional<bool> to !torch.any\n"
|
|
" %7 = call @__torch__.torch.jit._shape_functions.arange_start_step(%0, %1, %2, %3, %4, %5, %6) : (!torch.union<float, int>, !torch.union<float, int>, !torch.union<float, int>, !torch.any, !torch.any, !torch.any, !torch.any) -> !torch.list<int>\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.arange.start\"(%arg0: !torch.float, %arg1: !torch.float, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg0 : !torch.float to !torch.union<float, int>\n"
|
|
" %1 = torch.derefine %arg1 : !torch.float to !torch.union<float, int>\n"
|
|
" %2 = torch.derefine %arg2 : !torch.optional<int> to !torch.any\n"
|
|
" %3 = torch.derefine %arg3 : !torch.optional<int> to !torch.any\n"
|
|
" %4 = torch.derefine %arg4 : !torch.optional<Device> to !torch.any\n"
|
|
" %5 = torch.derefine %arg5 : !torch.optional<bool> to !torch.any\n"
|
|
" %6 = call @__torch__.torch.jit._shape_functions.arange_start(%0, %1, %2, %3, %4, %5) : (!torch.union<float, int>, !torch.union<float, int>, !torch.any, !torch.any, !torch.any, !torch.any) -> !torch.list<int>\n"
|
|
" return %6 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.arange\"(%arg0: !torch.float, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg0 : !torch.float to !torch.union<float, int>\n"
|
|
" %1 = torch.derefine %arg1 : !torch.optional<int> to !torch.any\n"
|
|
" %2 = torch.derefine %arg2 : !torch.optional<int> to !torch.any\n"
|
|
" %3 = torch.derefine %arg3 : !torch.optional<Device> to !torch.any\n"
|
|
" %4 = torch.derefine %arg4 : !torch.optional<bool> to !torch.any\n"
|
|
" %5 = call @__torch__.torch.jit._shape_functions.arange_end(%0, %1, %2, %3, %4) : (!torch.union<float, int>, !torch.any, !torch.any, !torch.any, !torch.any) -> !torch.list<int>\n"
|
|
" return %5 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.linspace\"(%arg0: !torch.float, %arg1: !torch.float, %arg2: !torch.int, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct %arg2 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.add.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sub.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.mul.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.div.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.div.Tensor_mode\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<str>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.div.Scalar_mode\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.optional<str>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.floor_divide\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.atan2\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.__and__.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.__or__.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.minimum\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.maximum\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fmin\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fmax\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bitwise_or.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bitwise_and.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bitwise_and.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bitwise_xor.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bitwise_right_shift.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bitwise_left_shift.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bitwise_not\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.logical_or\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.logical_and\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.logical_xor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.logical_not\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.threshold\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.threshold_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.eq.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.gt.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.ge.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.lt.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.le.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.isclose\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float, %arg3: !torch.float, %arg4: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.unsqueeze\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unsqueeze(%arg0, %arg1) : (!torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.squeeze\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.squeeze_nodim(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.squeeze.dim\"(%arg0: !torch.list<int>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.squeeze(%arg0, %arg1) : (!torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prims.squeeze\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.squeeze_dims(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prims.view_of\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prims.view_of\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prims.iota\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.Device, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct %arg0 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prims.iota\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.Device, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" return %arg3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.prim.NumToTensor.Scalar\"(%arg0: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tensor.float\"(%arg0: !torch.float, %arg1: !torch.optional<int>, %arg2: !torch.optional<Device>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tensor.int\"(%arg0: !torch.int, %arg1: !torch.optional<int>, %arg2: !torch.optional<Device>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tensor.bool\"(%arg0: !torch.bool, %arg1: !torch.optional<int>, %arg2: !torch.optional<Device>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.scalar_tensor\"(%arg0: !torch.float, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.scalar_tensor\"(%arg0: !torch.number, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._shape_as_tensor\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.where.self\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg1, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %0) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.where.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.where.ScalarOther\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.where.ScalarSelf\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.nan_to_num\"(%arg0: !torch.list<int>, %arg1: !torch.optional<float>, %arg2: !torch.optional<float>, %arg3: !torch.optional<float>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.lerp.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg1, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %0) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.lerp.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.addcmul\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg1, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %0) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.addcdiv\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.broadcast(%arg1, %arg2) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.broadcast(%arg0, %0) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.col2im\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: Expected size of input's dimension 2 to match the calculated number of sliding blocks\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: Expected size of input's dimension 1 to be divisible by the product of kernel_size\"\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: stride must be greater than 0\"\n"
|
|
" %str_2 = torch.constant.str \"AssertionError: padding should be non negative\"\n"
|
|
" %str_3 = torch.constant.str \"AssertionError: dilation should be greater than 0\"\n"
|
|
" %str_4 = torch.constant.str \"AssertionError: kernel size should be greater than 0\"\n"
|
|
" %str_5 = torch.constant.str \"AssertionError: padding is expected to have length 2\"\n"
|
|
" %str_6 = torch.constant.str \"AssertionError: stride is expected to have length 2\"\n"
|
|
" %str_7 = torch.constant.str \"AssertionError: dilation is expected to have length 2\"\n"
|
|
" %str_8 = torch.constant.str \"AssertionError: kernel_size is expected to have length 2\"\n"
|
|
" %str_9 = torch.constant.str \"AssertionError: output_size is expected to have length 2\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_10 = torch.constant.str \"AssertionError: Expected 2D or 3D (batch mode) tensor for input with possibly 0 batch size and non zero dimensions for input\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %75 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %76 = torch.aten.ne.int %75, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %76 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.bool) {\n"
|
|
" %75 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %76 = torch.aten.ne.int %75, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %76 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %75 = torch.aten.eq.int %0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %76 = torch.prim.If %75 -> (!torch.bool) {\n"
|
|
" %78 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %79 = torch.aten.ne.int %78, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %79 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %77 = torch.prim.If %76 -> (!torch.bool) {\n"
|
|
" %78 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %79 = torch.aten.ne.int %78, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %79 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %77 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_10, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.eq.int %5, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_9, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_8, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.len.t %arg3 : !torch.list<int> -> !torch.int\n"
|
|
" %10 = torch.aten.eq.int %9, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_7, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.aten.len.t %arg5 : !torch.list<int> -> !torch.int\n"
|
|
" %12 = torch.aten.eq.int %11, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_6, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.aten.len.t %arg4 : !torch.list<int> -> !torch.int\n"
|
|
" %14 = torch.aten.eq.int %13, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %14 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_5, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %15 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.gt.int %15, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.bool) {\n"
|
|
" %75 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %76 = torch.aten.gt.int %75, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %76 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %17 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_4, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %18 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.gt.int %18, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.bool) {\n"
|
|
" %75 = torch.aten.__getitem__.t %arg3, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %76 = torch.aten.gt.int %75, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %76 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %20 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_3, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %21 = torch.aten.__getitem__.t %arg4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.ge.int %21, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" %75 = torch.aten.__getitem__.t %arg4, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %76 = torch.aten.ge.int %75, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %76 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_2, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %24 = torch.aten.__getitem__.t %arg5, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.gt.int %24, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %26 = torch.prim.If %25 -> (!torch.bool) {\n"
|
|
" %75 = torch.aten.__getitem__.t %arg5, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %76 = torch.aten.gt.int %75, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %76 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %26 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %27 = torch.aten.eq.int %0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %28 = torch.prim.If %27 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int-1 : !torch.int\n"
|
|
" }\n"
|
|
" %29 = torch.aten.add.int %28, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %30 = torch.aten.__getitem__.t %arg0, %29 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %31 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %32 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %33 = torch.aten.mul.int %31, %32 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %34 = torch.aten.remainder.int %30, %33 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %35 = torch.aten.eq.int %34, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %35 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %36 = torch.aten.add.int %28, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %37 = torch.aten.__getitem__.t %arg0, %36 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %38 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %39 = torch.aten.__getitem__.t %arg4, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %40 = torch.aten.mul.int %int2, %39 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %41 = torch.aten.add.int %38, %40 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %42 = torch.aten.__getitem__.t %arg3, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %43 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %44 = torch.aten.sub.int %43, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %45 = torch.aten.mul.int %42, %44 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %46 = torch.aten.sub.int %41, %45 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %47 = torch.aten.sub.int %46, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %48 = torch.aten.__getitem__.t %arg5, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %49 = torch.aten.floordiv.int %47, %48 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %50 = torch.aten.add.int %49, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %51 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %52 = torch.aten.__getitem__.t %arg4, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %53 = torch.aten.mul.int %int2, %52 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %54 = torch.aten.add.int %51, %53 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %55 = torch.aten.__getitem__.t %arg3, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %56 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %57 = torch.aten.sub.int %56, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %58 = torch.aten.mul.int %55, %57 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %59 = torch.aten.sub.int %54, %58 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %60 = torch.aten.sub.int %59, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %61 = torch.aten.__getitem__.t %arg5, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %62 = torch.aten.floordiv.int %60, %61 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %63 = torch.aten.add.int %62, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %64 = torch.aten.mul.int %50, %63 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %65 = torch.aten.eq.int %37, %64 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %65 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %66 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %67 = torch.aten.__getitem__.t %arg2, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %68 = torch.aten.mul.int %66, %67 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %69 = torch.aten.floordiv.int %30, %68 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %70 = torch.aten.eq.int %28, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %71 = torch.prim.If %70 -> (!torch.list<int>) {\n"
|
|
" %75 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %76 = torch.prim.ListConstruct %75, %69 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %76 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %75 = torch.prim.ListConstruct %69 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %75 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %72 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %73 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %73, %true, init() {\n"
|
|
" ^bb0(%arg6: !torch.int):\n"
|
|
" %75 = torch.aten.__getitem__.t %arg1, %arg6 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %76 = torch.aten.append.t %72, %75 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %74 = torch.operator \"aten.add_.t\"(%71, %72) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int> \n"
|
|
" return %74 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.topk\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.bool, %arg4: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.topk(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.topk\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.bool, %arg4: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.real\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.imag\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.real\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %1 = call @__torch__.complex_to_float(%0) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.complex_to_float(%arg0: !torch.int) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: Unsupported dtype\"\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %int8 = torch.constant.int 8\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1 = torch.aten.eq.int %arg0, %int8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int5 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.eq.int %arg0, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %5 = torch.aten.eq.int %arg0, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int7 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %6 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.imag\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %1 = call @__torch__.complex_to_float(%0) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.view_as_complex\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.sub.int %1, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %2, %true, init() {\n"
|
|
" ^bb0(%arg1: !torch.int):\n"
|
|
" %3 = torch.aten.__getitem__.t %arg0, %arg1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.append.t %0, %3 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.view_as_complex\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: Unsupported dtype\"\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int8 = torch.constant.int 8\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %1#1, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int8 : !torch.int\n"
|
|
" } else {\n"
|
|
" %4 = torch.aten.eq.int %1#1, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int9 : !torch.int\n"
|
|
" } else {\n"
|
|
" %6 = torch.aten.eq.int %1#1, %int7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int10 : !torch.int\n"
|
|
" } else {\n"
|
|
" %8 = torch.aten.eq.int %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.eq.int %1#1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.eq.int %1#1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" }\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.eq.int %1#1, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" }\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.eq.int %1#1, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" }\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.eq.int %1#1, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" }\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int9 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.view_as_real\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.prim.ListConstruct %int2 : (!torch.int) -> !torch.list<int>\n"
|
|
" %1 = torch.aten.add.t %arg0, %0 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.view_as_real\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.eq.int %0#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int7 : !torch.int\n"
|
|
" }\n"
|
|
" return %3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%arg0: !torch.int) -> !torch.bool {\n"
|
|
" %0 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.all_complex_dtypes() : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.__contains__.int_list %0, %arg0 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" return %1 : !torch.bool\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.all_complex_dtypes() -> !torch.list<int> {\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %0 = torch.prim.ListConstruct %int9, %int10 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.torchvision.deform_conv2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.int, %arg6: !torch.int, %arg7: !torch.int, %arg8: !torch.int, %arg9: !torch.int, %arg10: !torch.int, %arg11: !torch.int, %arg12: !torch.int, %arg13: !torch.bool) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.__getitem__.t %arg2, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.__getitem__.t %arg2, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.prim.ListConstruct %0, %1, %2, %3 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.torchvision.deform_conv2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.tuple<int, int>, %arg4: !torch.tuple<int, int>, %arg5: !torch.int, %arg6: !torch.int, %arg7: !torch.int, %arg8: !torch.int, %arg9: !torch.int, %arg10: !torch.int, %arg11: !torch.int, %arg12: !torch.int, %arg13: !torch.bool) -> !torch.int {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.conv2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.conv2d(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.conv3d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.conv3d(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.conv_transpose2d.input\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int, %arg7: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg3 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %1 = torch.derefine %arg4 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %2 = torch.derefine %arg5 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %3 = torch.derefine %arg7 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %4 = call @__torch__.torch.jit._shape_functions.conv_transpose2d_input(%arg0, %arg1, %arg2, %0, %1, %2, %arg6, %3) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.int, !torch.optional<list<int>>) -> !torch.list<int>\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.conv_tbc\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %6, %7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.prim.ListConstruct %int1 : (!torch.int) -> !torch.list<int>\n"
|
|
" %10 = torch.prim.ListConstruct %arg3 : (!torch.int) -> !torch.list<int>\n"
|
|
" %11 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %12 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %13 = torch.derefine %arg2 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %14 = call @__torch__.torch.jit._shape_functions.conv_forwards(%arg0, %arg1, %13, %9, %10, %11, %false, %12, %int1) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" %15:3 = torch.prim.ListUnpack %14 : !torch.list<int> -> !torch.int, !torch.int, !torch.int\n"
|
|
" %16 = torch.prim.ListConstruct %15#2, %15#0, %15#1 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %16 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.convolution\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>, %arg8: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.conv_forwards(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.conv1d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.conv_forwards(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %false, %0, %int1) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.conv_transpose1d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int, %arg7: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = call @\"__torch_mlir_shape_fn.aten.convolution\"(%arg0, %arg1, %arg2, %arg3, %arg4, %arg7, %true, %arg5, %arg6) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.conv_transpose3d.input\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int, %arg7: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = call @\"__torch_mlir_shape_fn.aten.convolution\"(%arg0, %arg1, %arg2, %arg3, %arg4, %arg7, %true, %arg5, %arg6) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._convolution\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>, %arg8: !torch.int, %arg9: !torch.bool, %arg10: !torch.bool, %arg11: !torch.bool, %arg12: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @\"__torch_mlir_shape_fn.aten.convolution\"(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._convolution.deprecated\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>, %arg8: !torch.int, %arg9: !torch.bool, %arg10: !torch.bool, %arg11: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @\"__torch_mlir_shape_fn.aten.convolution\"(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.list<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.flip\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.convolution_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.optional<list<int>>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.list<int>, %arg7: !torch.bool, %arg8: !torch.list<int>, %arg9: !torch.int, %arg10: !torch.list<bool>) -> !torch.tuple<list<int>, list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.conv_backwards(%arg0, %arg1, %arg2, %arg3) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.optional<list<int>>) -> !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.batch_norm\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.optional<list<int>>, %arg5: !torch.bool, %arg6: !torch.float, %arg7: !torch.float, %arg8: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.batch_norm(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5, %arg6, %arg7, %arg8) : (!torch.list<int>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.bool, !torch.float, !torch.float, !torch.bool) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.group_norm\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.float, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.native_group_norm\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<int>>, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.int, %arg7: !torch.float) -> !torch.tuple<list<int>, list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = torch.prim.ListConstruct %arg3, %arg6 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.ListConstruct %arg3, %arg6 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %3 = torch.prim.TupleConstruct %0, %1, %2 : !torch.list<int>, !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" return %3 : !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.instance_norm\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.optional<list<int>>, %arg5: !torch.bool, %arg6: !torch.float, %arg7: !torch.float, %arg8: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._weight_norm_interface\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.unary(%arg1) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %2 = torch.prim.TupleConstruct %0, %1 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %2 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.slice.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.slice(%arg0, %arg1, %arg2, %arg3, %arg4) : (!torch.list<int>, !torch.int, !torch.optional<int>, !torch.optional<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.sort\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = torch.prim.TupleConstruct %arg0, %arg0 : !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sort\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.narrow\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.add.int %arg2, %arg3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %1 = torch.derefine %arg2 : !torch.int to !torch.optional<int>\n"
|
|
" %2 = torch.derefine %0 : !torch.int to !torch.optional<int>\n"
|
|
" %3 = call @__torch__.torch.jit._shape_functions.slice(%arg0, %arg1, %1, %2, %int1) : (!torch.list<int>, !torch.int, !torch.optional<int>, !torch.optional<int>, !torch.int) -> !torch.list<int>\n"
|
|
" return %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.narrow.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = torch.aten._set_item.t %arg0, %arg1, %arg3 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.slice_scatter\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.int) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.masked_scatter\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.select.int\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.select(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.select_scatter\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int, %arg3: !torch.int) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.scatter_reduce.two\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.str, %arg5: !torch.bool) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.scatter.src\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>, %arg3: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.scatter.value\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>, %arg3: !torch.float) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.scatter_add\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>, %arg3: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.index_select\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.index_select(%arg0, %arg1, %arg2) : (!torch.list<int>, !torch.int, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.index_put\"(%arg0: !torch.list<int>, %arg1: !torch.list<optional<list<int>>>, %arg2: !torch.list<int>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.index_put.hacked_twin\"(%arg0: !torch.list<int>, %arg1: !torch.list<list<int>>, %arg2: !torch.list<int>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.embedding_bag.padding_idx\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.bool, %arg4: !torch.int, %arg5: !torch.bool, %arg6: !torch.optional<list<int>>, %arg7: !torch.bool, %arg8: !torch.optional<int>) -> !torch.tuple<list<int>, list<int>, list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__._embedding_bag_helper(%arg0, %arg1, %arg2, %arg7, %arg4, %arg6, %arg8) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.int, !torch.optional<list<int>>, !torch.optional<int>) -> !torch.tuple<list<int>, list<int>, list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @__torch__._embedding_bag_helper(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.bool, %arg4: !torch.int, %arg5: !torch.optional<list<int>>, %arg6: !torch.optional<int>) -> !torch.tuple<list<int>, list<int>, list<int>, list<int>> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.len.t %arg2 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %7 = torch.aten.__getitem__.t %arg2, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.prim.If %arg3 -> (!torch.int) {\n"
|
|
" %19 = torch.aten.sub.int %7, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %19 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.append.t %6, %8 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %11 = torch.aten.append.t %6, %9 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %12 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %13 = torch.aten.eq.int %arg4, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.list<int>) {\n"
|
|
" %19 = torch.aten.append.t %12, %int0 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %12 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %19 = torch.aten.__is__ %arg5, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.bool) {\n"
|
|
" %22 = torch.aten.__is__ %arg6, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %22 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %21 = torch.prim.If %20 -> (!torch.list<int>) {\n"
|
|
" %22 = torch.prim.ListConstruct %int0 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %22 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %22 = func.call @__torch__.torch.jit._shape_functions._copy(%arg1) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %22 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %21 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %15 = call @__torch__.torch.jit._shape_functions._copy(%arg2) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" %16 = torch.aten.eq.int %arg4, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.list<int>) {\n"
|
|
" %19 = func.call @__torch__.torch.jit._shape_functions._copy(%6) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %19 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %19 = func.call @__torch__.torch.jit._shape_functions._copy(%arg2) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %19 : !torch.list<int>\n"
|
|
" }\n"
|
|
" %18 = torch.prim.TupleConstruct %6, %14, %15, %17 : !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int> -> !torch.tuple<list<int>, list<int>, list<int>, list<int>>\n"
|
|
" return %18 : !torch.tuple<list<int>, list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten._embedding_bag\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.bool, %arg4: !torch.int, %arg5: !torch.bool, %arg6: !torch.optional<list<int>>, %arg7: !torch.bool, %arg8: !torch.int) -> !torch.tuple<list<int>, list<int>, list<int>, list<int>> {\n"
|
|
" %0 = torch.derefine %arg8 : !torch.int to !torch.optional<int>\n"
|
|
" %1 = call @__torch__._embedding_bag_helper(%arg0, %arg1, %arg2, %arg7, %arg4, %arg6, %0) : (!torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool, !torch.int, !torch.optional<list<int>>, !torch.optional<int>) -> !torch.tuple<list<int>, list<int>, list<int>, list<int>>\n"
|
|
" return %1 : !torch.tuple<list<int>, list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.triu_indices\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.eq.int %arg0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.eq.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %3 : !torch.bool\n"
|
|
" }\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.list<int>) {\n"
|
|
" %3 = torch.prim.ListConstruct %int2, %int0 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %3 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.sub.int %arg2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %arg0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.eq.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" }\n"
|
|
" %6:2 = torch.prim.If %5 -> (!torch.int, !torch.int) {\n"
|
|
" torch.prim.If.yield %int0, %int0 : !torch.int, !torch.int\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.gt.int %3, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.int) {\n"
|
|
" %27 = torch.aten.add.int %int1, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.prim.min.int %arg1, %27 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %28 : !torch.int\n"
|
|
" } else {\n"
|
|
" %27 = torch.aten.add.int %arg0, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %28 = torch.aten.gt.int %27, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %29 = torch.aten.Int.bool %28 : !torch.bool -> !torch.int\n"
|
|
" torch.prim.If.yield %29 : !torch.int\n"
|
|
" }\n"
|
|
" %13 = torch.aten.add.int %arg0, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.prim.min.int %arg1, %13 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.prim.max.int %int0, %14 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.add.int %arg0, %3 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.prim.min.int %arg0, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %18 = torch.prim.max.int %int0, %17 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.sub.int %15, %12 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.add.int %19, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.add.int %12, %15 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.mul.int %21, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %23 = torch.aten.floordiv.int %22, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %24 = torch.aten.sub.int %18, %20 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.mul.int %24, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.prim.max.int %int0, %25 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %23, %26 : !torch.int, !torch.int\n"
|
|
" }\n"
|
|
" %7 = torch.aten.mul.int %arg0, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.add.int %6#0, %6#1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.sub.int %7, %8 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.prim.ListConstruct %int2, %9 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %10 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.tril_indices\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.eq.int %arg0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.eq.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %3 : !torch.bool\n"
|
|
" }\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.list<int>) {\n"
|
|
" %3 = torch.prim.ListConstruct %int2, %int0 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %3 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.gt.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" %21 = torch.aten.add.int %int1, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.prim.min.int %arg1, %21 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %22 : !torch.int\n"
|
|
" } else {\n"
|
|
" %21 = torch.aten.add.int %arg0, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.gt.int %21, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.aten.Int.bool %22 : !torch.bool -> !torch.int\n"
|
|
" torch.prim.If.yield %23 : !torch.int\n"
|
|
" }\n"
|
|
" %5 = torch.aten.add.int %arg0, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %6 = torch.prim.min.int %arg1, %5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %7 = torch.prim.max.int %int0, %6 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.add.int %arg0, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %9 = torch.prim.min.int %arg0, %8 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.prim.max.int %int0, %9 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.sub.int %7, %4 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.add.int %11, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.add.int %4, %7 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.mul.int %13, %12 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.floordiv.int %14, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.sub.int %10, %12 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.mul.int %16, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %18 = torch.prim.max.int %int0, %17 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.add.int %15, %18 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %20 = torch.prim.ListConstruct %int2, %19 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %20 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.nll_loss_forward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.int, %arg4: !torch.int) -> !torch.tuple<list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.nll_loss_forward(%arg0, %arg1, %arg2, %arg3) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.int) -> !torch.tuple<list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.nll_loss_backward\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.optional<list<int>>, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.unary(%arg1) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.mse_loss\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.eq.int %arg2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.list<int>) {\n"
|
|
" %2 = func.call @__torch__.torch.jit._shape_functions.unary(%arg0) : (!torch.list<int>) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %2 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.cross_entropy_loss\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.cross_entropy_loss(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5) : (!torch.list<int>, !torch.list<int>, !torch.optional<list<int>>, !torch.int, !torch.int, !torch.float) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.native_layer_norm\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.float) -> !torch.tuple<list<int>, list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.native_layer_norm(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.native_batch_norm\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<int>>, %arg3: !torch.optional<list<int>>, %arg4: !torch.optional<list<int>>, %arg5: !torch.bool, %arg6: !torch.float, %arg7: !torch.float) -> !torch.tuple<list<int>, list<int>, list<int>> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.native_batch_norm(%arg0, %arg1, %arg2, %arg3, %arg4, %arg5) : (!torch.list<int>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.optional<list<int>>, !torch.bool) -> !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" return %0 : !torch.tuple<list<int>, list<int>, list<int>>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.constant_pad_nd\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.float) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.pad_shape_fn(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.pad_shape_fn(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %str = torch.constant.str \"AssertionError: Number of padded dimensions must be less than or equal to the input dimension\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: Must have paired low-high pad amount values\"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.remainder.int %0, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.eq.int %1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.floordiv.int %3, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.aten.le.int %4, %5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.floordiv.int %7, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %8, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %9 = torch.aten.add.int %arg2, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.neg.int %9 : !torch.int -> !torch.int\n"
|
|
" %11 = torch.aten.mul.int %int2, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %12 = torch.aten.__getitem__.t %arg1, %11 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.mul.int %int2, %arg2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.add.int %13, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.__getitem__.t %arg1, %14 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.add.int %12, %15 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.__getitem__.t %arg0, %10 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %18 = torch.aten.add.int %17, %16 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten._set_item.t %arg0, %10, %18 : !torch.list<int>, !torch.int, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.replication_pad2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: padding size expected to be 4\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: \"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.ge.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %3 = torch.aten.eq.int %2, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = call @__torch__.pad_shape_fn(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.replication_pad2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.pad\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.str, %arg3: !torch.optional<float>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.pad_shape_fn(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.reflection_pad1d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.ge.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %5 = torch.aten.lt.int %3, %2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" %8 = torch.aten.lt.int %4, %2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %8 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %7 = call @__torch__.pad_shape_fn(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %7 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.reflection_pad2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str = torch.constant.str \"AssertionError: padding size expected to be 4\"\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %int-2 = torch.constant.int -2\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: \"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.ge.int %0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.__getitem__.t %arg0, %int-2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.__getitem__.t %arg0, %int-1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %7 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = torch.aten.__getitem__.t %arg1, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %9 = torch.aten.__getitem__.t %arg1, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %10 = torch.aten.lt.int %6, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.bool) {\n"
|
|
" %15 = torch.aten.lt.int %7, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %12 = torch.aten.lt.int %8, %2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %15 = torch.aten.lt.int %9, %2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %13 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %14 = call @__torch__.pad_shape_fn(%arg0, %arg1) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" return %14 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.index.Tensor\"(%arg0: !torch.list<int>, %arg1: !torch.list<optional<list<int>>>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.index_tensor_like(%arg0, %arg1) : (!torch.list<int>, !torch.list<optional<list<int>>>) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @__torch__.index_tensor_like(%arg0: !torch.list<int>, %arg1: !torch.list<optional<list<int>>>) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int-1 = torch.constant.int -1\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: More indices than dimensions to index\"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int9223372036854775807 = torch.constant.int 9223372036854775807\n"
|
|
" %0 = torch.aten.len.t %arg1 : !torch.list<optional<list<int>>> -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.le.int %0, %1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %4 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %5 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %6 = torch.prim.Loop %5, %true, init(%3) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.list<int>):\n"
|
|
" %10 = torch.aten.len.t %arg1 : !torch.list<optional<list<int>>> -> !torch.int\n"
|
|
" %11 = torch.aten.ge.int %arg2, %10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.list<int>) {\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.append.t %4, %13 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %arg3 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<optional<list<int>>>, !torch.int -> !torch.optional<list<int>>\n"
|
|
" %14 = torch.aten.__isnot__ %13, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.list<int>) {\n"
|
|
" %16 = torch.prim.unchecked_cast %13 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %17 = func.call @__torch__.torch.jit._shape_functions.broadcast(%arg3, %16) : (!torch.list<int>, !torch.list<int>) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %17 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %16 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %17 = torch.aten.append.t %4, %16 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %arg3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %15 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%12 : !torch.list<int>)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.list<int>) -> !torch.list<int>\n"
|
|
" %7 = torch.aten.len.t %4 : !torch.list<int> -> !torch.int\n"
|
|
" %8 = torch.aten.eq.int %7, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.list<int>) {\n"
|
|
" torch.prim.If.yield %6 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %10 = torch.aten.len.t %arg1 : !torch.list<optional<list<int>>> -> !torch.int\n"
|
|
" %11 = torch.prim.ListConstruct %int9223372036854775807, %10 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %12 = torch.prim.min.self_int %11 : !torch.list<int> -> !torch.int\n"
|
|
" %13:3 = torch.prim.Loop %12, %true, init(%true, %int-1, %int-1) {\n"
|
|
" ^bb0(%arg2: !torch.int, %arg3: !torch.bool, %arg4: !torch.int, %arg5: !torch.int):\n"
|
|
" %16 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<optional<list<int>>>, !torch.int -> !torch.optional<list<int>>\n"
|
|
" %17 = torch.aten.__isnot__ %16, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %18:3 = torch.prim.If %17 -> (!torch.bool, !torch.int, !torch.int) {\n"
|
|
" %19 = torch.aten.eq.int %arg4, %int-1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20:2 = torch.prim.If %19 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %arg3, %arg2 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %21 = torch.aten.sub.int %arg2, %arg5 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.ne.int %21, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %23, %arg4 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %20#0, %20#1, %arg2 : !torch.bool, !torch.int, !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg3, %arg4, %arg5 : !torch.bool, !torch.int, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.Loop.condition %true, iter(%18#0, %18#1, %18#2 : !torch.bool, !torch.int, !torch.int)\n"
|
|
" } : (!torch.int, !torch.bool, !torch.bool, !torch.int, !torch.int) -> (!torch.bool, !torch.int, !torch.int)\n"
|
|
" %14 = torch.aten.__not__ %13#0 : !torch.bool -> !torch.bool\n"
|
|
" %15 = torch.prim.If %14 -> (!torch.list<int>) {\n"
|
|
" %16 = torch.aten.add.t %6, %4 : !torch.list<int>, !torch.list<int> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %16 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %16 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" torch.prim.Loop %13#1, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %20 = torch.aten.__getitem__.t %4, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.append.t %16, %20 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %17 = torch.aten.len.t %6 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %17, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %20 = torch.aten.__getitem__.t %6, %arg2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.append.t %16, %20 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %18 = torch.aten.len.t %4 : !torch.list<int> -> !torch.int\n"
|
|
" %19 = torch.aten.__range_length %13#1, %18, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.Loop %19, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %20 = torch.aten.__derive_index %arg2, %13#1, %int1 : !torch.int, !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.__getitem__.t %4, %20 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %22 = torch.aten.append.t %16, %21 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" torch.prim.If.yield %16 : !torch.list<int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %15 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %9 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.index.Tensor_hacked_twin\"(%arg0: !torch.list<int>, %arg1: !torch.list<list<int>>) -> !torch.list<int> {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<optional<list<int>>>\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<list<int>> -> !torch.int\n"
|
|
" torch.prim.Loop %1, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %3 = torch.aten.__getitem__.t %arg1, %arg2 : !torch.list<list<int>>, !torch.int -> !torch.list<int>\n"
|
|
" %4 = torch.aten.append.t %0, %3 : !torch.list<optional<list<int>>>, !torch.list<int> -> !torch.list<optional<list<int>>>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %2 = call @__torch__.index_tensor_like(%arg0, %0) : (!torch.list<int>, !torch.list<optional<list<int>>>) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.cat\"(%arg0: !torch.list<list<int>>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.cat(%arg0, %arg1) : (!torch.list<list<int>>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.atleast_1d\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.list<int>) {\n"
|
|
" %3 = torch.prim.ListConstruct %int1 : (!torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %3 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.stack\"(%arg0: !torch.list<list<int>>, %arg1: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.torch.jit._shape_functions.stack(%arg0, %arg1) : (!torch.list<list<int>>, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fft_fft\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.int, %arg3: !torch.optional<str>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.stft\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<list<int>>, %arg5: !torch.bool, %arg6: !torch.optional<bool>, %arg7: !torch.optional<bool>) -> !torch.list<int> {\n"
|
|
" %str = torch.constant.str \"AssertionError: Expected hop_length to be greater than 0\"\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: Expected that 0 < n_fft <= len\"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: Expected input tensor to be of shape (B?,L), where B is an optional batch dimension\"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %25 = torch.aten.eq.int %24, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %25 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %4 = torch.aten.eq.int %3, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.optional<int>) {\n"
|
|
" %24 = torch.derefine %none : !torch.none to !torch.optional<int>\n"
|
|
" torch.prim.If.yield %24 : !torch.optional<int>\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %25 = torch.derefine %24 : !torch.int to !torch.optional<int>\n"
|
|
" torch.prim.If.yield %25 : !torch.optional<int>\n"
|
|
" }\n"
|
|
" %6 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %7 = torch.aten.eq.int %6, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" %24 = torch.aten.floordiv.int %arg1, %int4 : !torch.int, !torch.int -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" } else {\n"
|
|
" %24 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" }\n"
|
|
" %11 = torch.aten.gt.int %arg1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.bool) {\n"
|
|
" %24 = torch.aten.le.int %arg1, %8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %24 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %12 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %13 = torch.aten.gt.int %10, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %13 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %14 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %15 = torch.aten.__isnot__ %5, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %15 -> () {\n"
|
|
" %24 = torch.prim.unchecked_cast %5 : !torch.optional<int> -> !torch.int\n"
|
|
" %25 = torch.aten.append.t %14, %24 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %16 = torch.aten.__is__ %arg6, %none : !torch.optional<bool>, !torch.none -> !torch.bool\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %24 = torch.prim.unchecked_cast %arg6 : !torch.optional<bool> -> !torch.bool\n"
|
|
" %25 = torch.operator \"aten.eq.bool\"(%24, %true) : (!torch.bool, !torch.bool) -> !torch.bool \n"
|
|
" torch.prim.If.yield %25 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %17 -> () {\n"
|
|
" %24 = torch.aten.floordiv.int %arg1, %int2 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %25 = torch.aten.add.int %24, %int1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %26 = torch.aten.append.t %14, %25 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" %24 = torch.aten.append.t %14, %arg1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %18 = torch.aten.sub.int %8, %arg1 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %19 = torch.aten.floordiv.int %18, %10 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.add.int %int1, %19 : !torch.int, !torch.int -> !torch.int\n"
|
|
" %21 = torch.aten.append.t %14, %20 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" %22 = torch.aten.__isnot__ %arg7, %none : !torch.optional<bool>, !torch.none -> !torch.bool\n"
|
|
" %23 = torch.prim.If %22 -> (!torch.bool) {\n"
|
|
" %24 = torch.prim.unchecked_cast %arg7 : !torch.optional<bool> -> !torch.bool\n"
|
|
" %25 = torch.operator \"aten.eq.bool\"(%24, %false) : (!torch.bool, !torch.bool) -> !torch.bool \n"
|
|
" torch.prim.If.yield %25 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %23 -> () {\n"
|
|
" %24 = torch.aten.append.t %14, %int2 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %14 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.fft_ifft\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.int, %arg3: !torch.optional<str>) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.bincount\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.hacky_get_unknown_dimension_size() : () -> !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.nonzero\"(%arg0: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.hacky_get_unknown_dimension_size() : () -> !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0, %1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.masked_select\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>) -> !torch.list<int> {\n"
|
|
" %0 = call @__torch__.hacky_get_unknown_dimension_size() : () -> !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0 : (!torch.int) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.nonzero_static\"(%arg0: !torch.list<int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.list<int> {\n"
|
|
" %0 = torch.aten.len.t %arg0 : !torch.list<int> -> !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %arg1, %0 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.linalg_vector_norm\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.optional<list<int>>, %arg3: !torch.bool, %arg4: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg4 : !torch.optional<int> to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg2, %arg3, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.linalg_norm\"(%arg0: !torch.list<int>, %arg1: !torch.optional<float>, %arg2: !torch.optional<list<int>>, %arg3: !torch.bool, %arg4: !torch.optional<int>) -> !torch.list<int> {\n"
|
|
" %0 = torch.derefine %arg4 : !torch.optional<int> to !torch.any\n"
|
|
" %1 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %arg2, %arg3, %0) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %1 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.frobenius_norm.dim\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.derefine %arg1 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %1 = torch.derefine %int0 : !torch.int to !torch.any\n"
|
|
" %2 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %0, %arg2, %1) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.renorm\"(%arg0: !torch.list<int>, %arg1: !torch.float, %arg2: !torch.int, %arg3: !torch.float) -> !torch.list<int> {\n"
|
|
" return %arg0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.norm.Scalar\"(%arg0: !torch.list<int>, %arg1: !torch.float) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.optional<list<int>>\n"
|
|
" %1 = torch.derefine %none : !torch.none to !torch.any\n"
|
|
" %2 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %0, %false, %1) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.norm.ScalarOpt_dim\"(%arg0: !torch.list<int>, %arg1: !torch.optional<float>, %arg2: !torch.list<int>, %arg3: !torch.bool) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.derefine %arg2 : !torch.list<int> to !torch.optional<list<int>>\n"
|
|
" %1 = torch.derefine %int0 : !torch.int to !torch.any\n"
|
|
" %2 = call @__torch__.torch.jit._shape_functions.sum_mean_dim(%arg0, %0, %arg3, %1) : (!torch.list<int>, !torch.optional<list<int>>, !torch.bool, !torch.any) -> !torch.list<int>\n"
|
|
" return %2 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.upsample_nearest1d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<float>) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0, %1, %2 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %3 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.upsample_nearest1d.vec\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<float>>) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.list<float>\n"
|
|
" %1 = torch.prim.Uninitialized : !torch.optional<list<int>>\n"
|
|
" %2 = torch.prim.Uninitialized : !torch.optional<list<float>>\n"
|
|
" %3 = torch.aten.__is__ %arg1, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.prim.unchecked_cast %arg1 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %12 = torch.aten.__is__ %arg2, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" }\n"
|
|
" %5:2 = torch.prim.If %4 -> (!torch.optional<list<int>>, !torch.optional<list<float>>) {\n"
|
|
" torch.prim.If.yield %arg1, %arg2 : !torch.optional<list<int>>, !torch.optional<list<float>>\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %1, %2 : !torch.optional<list<int>>, !torch.optional<list<float>>\n"
|
|
" }\n"
|
|
" %6 = torch.aten.__is__ %5#0, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" %11 = torch.aten.__is__ %5#1, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.prim.unchecked_cast %5#0 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__isnot__ %5#0, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.list<int>) {\n"
|
|
" %11 = torch.prim.unchecked_cast %5#0 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %11, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.prim.ListConstruct %12, %13, %14 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %15 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.__isnot__ %5#1, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.list<float>) {\n"
|
|
" %20 = torch.prim.unchecked_cast %5#1 : !torch.optional<list<float>> -> !torch.list<float>\n"
|
|
" torch.prim.If.yield %20 : !torch.list<float>\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.list<float>\n"
|
|
" }\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %12, %int0 : !torch.list<float>, !torch.int -> !torch.float\n"
|
|
" %17 = torch.operator \"aten.mul.int_float\"(%15, %16) : (!torch.int, !torch.float) -> !torch.float \n"
|
|
" %18 = torch.aten.Int.float %17 : !torch.float -> !torch.int\n"
|
|
" %19 = torch.prim.ListConstruct %13, %14, %18 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %19 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %10 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.upsample_nearest2d\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<float>, %arg3: !torch.optional<float>) -> !torch.list<int> {\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %1 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %2 = torch.aten.__getitem__.t %arg1, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %3 = torch.aten.__getitem__.t %arg1, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.prim.ListConstruct %0, %1, %2, %3 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %4 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_shape_fn.aten.upsample_nearest2d.vec\"(%arg0: !torch.list<int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<float>>) -> !torch.list<int> {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.list<float>\n"
|
|
" %1 = torch.prim.Uninitialized : !torch.optional<list<int>>\n"
|
|
" %2 = torch.prim.Uninitialized : !torch.optional<list<float>>\n"
|
|
" %3 = torch.aten.__is__ %arg1, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.prim.unchecked_cast %arg1 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %12 = torch.aten.__is__ %arg2, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" }\n"
|
|
" %5:2 = torch.prim.If %4 -> (!torch.optional<list<int>>, !torch.optional<list<float>>) {\n"
|
|
" torch.prim.If.yield %arg1, %arg2 : !torch.optional<list<int>>, !torch.optional<list<float>>\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %1, %2 : !torch.optional<list<int>>, !torch.optional<list<float>>\n"
|
|
" }\n"
|
|
" %6 = torch.aten.__is__ %5#0, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" %11 = torch.aten.__is__ %5#1, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.prim.unchecked_cast %5#0 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.aten.__isnot__ %5#0, %none : !torch.optional<list<int>>, !torch.none -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.list<int>) {\n"
|
|
" %11 = torch.prim.unchecked_cast %5#0 : !torch.optional<list<int>> -> !torch.list<int>\n"
|
|
" %12 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %11, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.__getitem__.t %11, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.prim.ListConstruct %12, %13, %14, %15 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %16 : !torch.list<int>\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.__isnot__ %5#1, %none : !torch.optional<list<float>>, !torch.none -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.list<float>) {\n"
|
|
" %24 = torch.prim.unchecked_cast %5#1 : !torch.optional<list<float>> -> !torch.list<float>\n"
|
|
" torch.prim.If.yield %24 : !torch.list<float>\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.list<float>\n"
|
|
" }\n"
|
|
" %13 = torch.aten.__getitem__.t %arg0, %int0 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %14 = torch.aten.__getitem__.t %arg0, %int1 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %15 = torch.aten.__getitem__.t %arg0, %int2 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %16 = torch.aten.__getitem__.t %12, %int0 : !torch.list<float>, !torch.int -> !torch.float\n"
|
|
" %17 = torch.operator \"aten.mul.int_float\"(%15, %16) : (!torch.int, !torch.float) -> !torch.float \n"
|
|
" %18 = torch.aten.Int.float %17 : !torch.float -> !torch.int\n"
|
|
" %19 = torch.aten.__getitem__.t %arg0, %int3 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %20 = torch.aten.__getitem__.t %12, %int1 : !torch.list<float>, !torch.int -> !torch.float\n"
|
|
" %21 = torch.operator \"aten.mul.int_float\"(%19, %20) : (!torch.int, !torch.float) -> !torch.float \n"
|
|
" %22 = torch.aten.Int.float %21 : !torch.float -> !torch.int\n"
|
|
" %23 = torch.prim.ListConstruct %13, %14, %18, %22 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" torch.prim.If.yield %23 : !torch.list<int>\n"
|
|
" }\n"
|
|
" return %10 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prims.split_dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fake_quantize_per_tensor_affine\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.int) -> !torch.int {\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.ne.int %0#1, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%arg0: !torch.int) -> !torch.bool {\n"
|
|
" %0 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.all_float_dtypes() : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.__contains__.int_list %0, %arg0 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" return %1 : !torch.bool\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.all_float_dtypes() -> !torch.list<int> {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0 = torch.prim.ListConstruct %int5, %int15, %int6, %int7 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fake_quantize_per_tensor_affine_cachemask\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.int) -> !torch.tuple<int, int> {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.ne.int %0#1, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.prim.TupleConstruct %3, %int11 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %4 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fake_quantize_per_tensor_affine.tensor_qparams\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.int, %arg4: !torch.int) -> !torch.int {\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.ne.int %0#1, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._fake_quantize_per_tensor_affine_cachemask_tensor_qparams\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.tuple<int, int>, %arg4: !torch.int, %arg5: !torch.int) -> !torch.tuple<int, int> {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.ne.int %0#1, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.prim.TupleConstruct %3, %int11 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %4 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fake_quantize_per_channel_affine\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int) -> !torch.int {\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.ne.int %0#1, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fake_quantize_per_channel_affine_cachemask\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int) -> !torch.tuple<int, int> {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.aten.ne.int %0#1, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.prim.TupleIndex %arg0, %int1 : !torch.tuple<int, int>, !torch.int -> !torch.int\n"
|
|
" %4 = torch.prim.TupleConstruct %3, %int11 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %4 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.cosh\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__._get_dtype_of_floating_point_op(%arg0: !torch.int) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %0 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%arg0) : (!torch.int) -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.bool) {\n"
|
|
" %4 = torch.aten.ne.int %arg0, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %4 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %4 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%arg0) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If.yield %4 : !torch.bool\n"
|
|
" }\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %arg0 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" }\n"
|
|
" return %3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.acosh\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tanh\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.exp\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.expm1\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.rad2deg\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %4 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If.yield %4 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%arg0: !torch.int) -> !torch.bool {\n"
|
|
" %0 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.all_integer_dtypes() : () -> !torch.list<int>\n"
|
|
" %1 = torch.aten.__contains__.int_list %0, %arg0 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" return %1 : !torch.bool\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.all_integer_dtypes() -> !torch.list<int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0 = torch.prim.ListConstruct %int11, %int0, %int1, %int2, %int3, %int4 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" return %0 : !torch.list<int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sin\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sinh\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.asin\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.asinh\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.cos\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.acos\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sigmoid\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.reciprocal\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sqrt\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.log\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.log2\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.log10\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.log1p\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.log_sigmoid\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.hann_window.periodic\"(%arg0: !torch.int, %arg1: !torch.bool, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.hardshrink\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.softshrink\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.logit\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<float>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.rsqrt\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.erf\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.softplus\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = func.call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.frobenius_norm.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %3 = torch.aten.__not__ %2 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.eq.int %1#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5:2 = torch.prim.If %4 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int7 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %7 = torch.aten.eq.int %1#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8:2 = torch.prim.If %7 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int6 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false, %0 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %8#0, %8#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" %6 = torch.prim.If %5#0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %5#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %7 = func.call @__torch__._get_dtype_of_floating_point_op(%1#1) : (!torch.int) -> !torch.int\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" }\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prims.sqrt\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = func.call @__torch__._get_dtype_of_floating_point_op(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.abs\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %1#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %3:2 = torch.prim.If %2 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int7 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %5 = torch.aten.eq.int %1#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6:2 = torch.prim.If %5 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int6 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false, %0 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %6#0, %6#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" %4 = torch.prim.If %3#0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %3#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %1#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.adaptive_avg_pool1d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.pixel_shuffle\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.avg_pool1d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.adaptive_avg_pool2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.adaptive_avg_pool3d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.avg_pool2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool, %arg5: !torch.bool, %arg6: !torch.optional<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.avg_pool3d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.bool, %arg5: !torch.bool, %arg6: !torch.optional<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.batch_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<tuple<int, int>>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.optional<tuple<int, int>>, %arg4: !torch.optional<tuple<int, int>>, %arg5: !torch.bool, %arg6: !torch.float, %arg7: !torch.float, %arg8: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.group_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.optional<tuple<int, int>>, %arg4: !torch.float, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.native_group_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<tuple<int, int>>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.int, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.int, %arg7: !torch.float) -> !torch.tuple<int, int, int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.prim.TupleConstruct %0#1, %0#1, %0#1 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" return %3 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.instance_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<tuple<int, int>>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.optional<tuple<int, int>>, %arg4: !torch.optional<tuple<int, int>>, %arg5: !torch.bool, %arg6: !torch.float, %arg7: !torch.float, %arg8: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._weight_norm_interface\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int) -> !torch.tuple<int, int> {\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.tuple<int, int>\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = torch.aten.eq.int %1#1, %2#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%2#1) : (!torch.int) -> !torch.bool\n"
|
|
" %5 = torch.aten.__not__ %4 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.aten.eq.int %2#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7:2 = torch.prim.If %6 -> (!torch.bool, !torch.tuple<int, int>) {\n"
|
|
" %9 = torch.prim.TupleConstruct %1#1, %int7 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %true, %9 : !torch.bool, !torch.tuple<int, int>\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.eq.int %2#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10:2 = torch.prim.If %9 -> (!torch.bool, !torch.tuple<int, int>) {\n"
|
|
" %11 = torch.prim.TupleConstruct %1#1, %int6 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %true, %11 : !torch.bool, !torch.tuple<int, int>\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.eq.int %2#1, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12:2 = torch.prim.If %11 -> (!torch.bool, !torch.tuple<int, int>) {\n"
|
|
" %13 = torch.prim.TupleConstruct %1#1, %int6 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %true, %13 : !torch.bool, !torch.tuple<int, int>\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false, %0 : !torch.bool, !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %12#0, %12#1 : !torch.bool, !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %10#0, %10#1 : !torch.bool, !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" %8 = torch.prim.If %7#0 -> (!torch.tuple<int, int>) {\n"
|
|
" torch.prim.If.yield %7#1 : !torch.tuple<int, int>\n"
|
|
" } else {\n"
|
|
" %9 = torch.prim.TupleConstruct %1#1, %2#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %9 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" return %8 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bernoulli_.float\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.any) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bernoulli\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.any) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bernoulli.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.any) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.multinomial\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool, %arg3: !torch.any) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" return %int4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bitwise_not\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.broadcast_to\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.cosine_similarity\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int, %arg3: !torch.float) -> !torch.int {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.prim.ListConstruct %int15, %int5, %int6, %int7 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = torch.aten.__contains__.int_list %3, %0#1 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.aten.__not__ %4 : !torch.bool -> !torch.bool\n"
|
|
" %6 = torch.aten.__not__ %5 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.ceil\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.trunc\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.clamp_max\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.clamp_min\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.clamp_min.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%arg0: !torch.list<optional<int>>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0 = torch.promote_dtypes %arg0, %arg1 : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.clamp\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<number>, %arg2: !torch.optional<number>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.clamp.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<tuple<int, int>>, %arg2: !torch.optional<tuple<int, int>>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0 : (!torch.int) -> !torch.list<optional<int>>\n"
|
|
" %2 = torch.prim.ListConstruct %0#1 : (!torch.int) -> !torch.list<int>\n"
|
|
" %3 = torch.aten.__isnot__ %arg1, %none : !torch.optional<tuple<int, int>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" %8 = torch.prim.unchecked_cast %arg1 : !torch.optional<tuple<int, int>> -> !torch.tuple<int, int>\n"
|
|
" %9:2 = torch.prim.TupleUnpack %8 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %10 = torch.aten.append.t %1, %9#0 : !torch.list<optional<int>>, !torch.int -> !torch.list<optional<int>>\n"
|
|
" %11 = torch.aten.append.t %2, %9#1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.__isnot__ %arg2, %none : !torch.optional<tuple<int, int>>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" %8 = torch.prim.unchecked_cast %arg2 : !torch.optional<tuple<int, int>> -> !torch.tuple<int, int>\n"
|
|
" %9:2 = torch.prim.TupleUnpack %8 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %10 = torch.aten.append.t %1, %9#0 : !torch.list<optional<int>>, !torch.int -> !torch.list<optional<int>>\n"
|
|
" %11 = torch.aten.append.t %2, %9#1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.len.t %1 : !torch.list<optional<int>> -> !torch.int\n"
|
|
" %6 = torch.aten.gt.int %5, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.int) {\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %2) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" torch.prim.If.yield %8 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %7 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.clone\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.constant_pad_nd\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.grid_sampler\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int, %arg3: !torch.int, %arg4: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.__interpolate.size_list_scale_list\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<float>>, %arg3: !torch.str, %arg4: !torch.optional<bool>, %arg5: !torch.optional<bool>, %arg6: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.reflection_pad1d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: padding size expected to be 2\"\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.len.t %arg1 : !torch.list<int> -> !torch.int\n"
|
|
" %2 = torch.aten.eq.int %1, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.reflection_pad2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.contiguous\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.copy\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.cpu\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.cumsum\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%2#1) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %2#1 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.detach\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.linalg_det\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.dropout\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.native_dropout\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.optional<bool>) -> !torch.tuple<int, int> {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int11 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.expand_as\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.expand\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fill.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fill.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.flatten.using_ints\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.unflatten.int\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.flip\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sign\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sgn\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.floor\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.gather\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.tuple<int, int>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.gelu_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.str) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.gelu\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.str) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.hardsigmoid\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.hardswish\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.hardtanh_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number, %arg3: !torch.number) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.hardtanh\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %int0, %int11 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %2 = torch.aten.__contains__.int_list %1, %0#1 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" %3 = torch.aten.__not__ %2 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.index_put.hacked_twin\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<tuple<int, int>>, %arg2: !torch.tuple<int, int>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._unsafe_index_put.hacked_twin\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<tuple<int, int>>, %arg2: !torch.tuple<int, int>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._index_put_impl\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<optional<tuple<int, int>>>, %arg2: !torch.tuple<int, int>, %arg3: !torch.bool, %arg4: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.index_put\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<optional<tuple<int, int>>>, %arg2: !torch.tuple<int, int>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.index_select\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.index.Tensor_hacked_twin\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<tuple<int, int>>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.index.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<optional<tuple<int, int>>>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.layer_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.optional<tuple<int, int>>, %arg4: !torch.float, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.leaky_relu_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.lift_fresh_copy\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.linalg_cross\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.ne.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %6 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %5) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.kthvalue\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._log_softmax_backward_data\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int, %arg3: !torch.int) -> !torch.int {\n"
|
|
" return %arg3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.masked_fill.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.masked_fill_.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.masked_fill.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.masked_select\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max_pool1d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max_pool2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max_pool3d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max_pool2d_with_indices\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max_unpool3d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.adaptive_max_pool1d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.adaptive_max_pool2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.adaptive_max_pool3d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.mish\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.narrow\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.narrow.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.tuple<int, int>, %arg3: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.neg\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.numpy_T\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.pad\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.str, %arg3: !torch.optional<float>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.permute\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.pow.Tensor_Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.prelu\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.celu\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.rrelu\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number, %arg3: !torch.bool, %arg4: !torch.any) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If.yield %3 : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.relu6\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.relu\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.repeat\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.repeat_interleave.self_int\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tile\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._reshape_alias\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.reshape\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.reshape_as\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.resize_\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.roll\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.round\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.glu\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.scatter_reduce.two\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.tuple<int, int>, %arg3: !torch.tuple<int, int>, %arg4: !torch.str, %arg5: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.select.int\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.select_scatter\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int, %arg3: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.scatter.src\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.tuple<int, int>, %arg3: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.scatter.value\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.tuple<int, int>, %arg3: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.scatter_add\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.tuple<int, int>, %arg3: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.masked_scatter\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.silu\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.slice_scatter\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.slice.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._softmax_backward_data\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int, %arg3: !torch.int) -> !torch.int {\n"
|
|
" return %arg3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.linalg_slogdet\"(%arg0: !torch.tuple<int, int>) -> !torch.tuple<int, int> {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int8 = torch.constant.int 8\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.ne.int %0#1, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" %11 = torch.aten.ne.int %0#1, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.eq.int %0#1, %int8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.eq.int %0#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" }\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" %8 = torch.aten.eq.int %0#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int7 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" }\n"
|
|
" %10 = torch.prim.TupleConstruct %0#1, %9 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %10 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.square\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.squeeze.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.squeeze\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tanh_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.threshold\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.t\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.to.prim_Device\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<Device>, %arg2: !torch.optional<int>, %arg3: !torch.bool, %arg4: !torch.bool) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.transpose.int\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.triu\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tril\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.diagonal\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.uniform\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.float, %arg3: !torch.any) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.exponential\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.any) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.rand\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._unsafe_view\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.unsqueeze\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.upsample_nearest2d_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.optional<float>, %arg4: !torch.optional<float>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.upsample_nearest1d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.optional<float>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.upsample_nearest1d.vec\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<float>>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.upsample_nearest2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.optional<float>, %arg3: !torch.optional<float>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.upsample_nearest2d.vec\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<list<float>>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.view\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.zero\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.zero_\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prim.abs.Scalar\"(%arg0: !torch.number) -> !torch.int {\n"
|
|
" %0 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg0) : (!torch.number) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg0: !torch.number) -> !torch.int {\n"
|
|
" %0 = torch.prim.NumToTensor.Scalar %arg0 : !torch.number -> !torch.tensor\n"
|
|
" %1 = torch.prim.dtype %0 : !torch.tensor -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.nll_loss_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.optional<tuple<int, int>>, %arg4: !torch.int, %arg5: !torch.int, %arg6: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %5 = torch.aten.eq.int %4, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max_pool2d_with_indices_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %1#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.all\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int11 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.any\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int11 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.eq.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.eq.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.ge.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.gt.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.gt.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.ge.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.le.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.logical_and\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.logical_not\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.isclose\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.float, %arg3: !torch.float, %arg4: !torch.bool) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.scaled_dot_product_attention\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.optional<tuple<int, int>>, %arg4: !torch.float, %arg5: !torch.bool, %arg6: !torch.optional<float>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.logical_or\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.logical_xor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.lt.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.lt.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.le.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.isnan\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.isinf\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.isneginf\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %3 = torch.aten.ne.int %0#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %3 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.isposinf\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %3 = torch.aten.ne.int %0#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %3 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.ne.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.ne.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" return %int11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.add\"(%arg0: !torch.number, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.prim.ListConstruct %none, %none : (!torch.none, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg0) : (!torch.number) -> !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%0, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fft_fft\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.int, %arg3: !torch.optional<str>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: Unsupported dtype\"\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int8 = torch.constant.int 8\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %1#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %4 = torch.aten.eq.int %1#1, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int8 : !torch.int\n"
|
|
" } else {\n"
|
|
" %6 = torch.aten.eq.int %1#1, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int9 : !torch.int\n"
|
|
" } else {\n"
|
|
" %8 = torch.aten.eq.int %1#1, %int7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int10 : !torch.int\n"
|
|
" } else {\n"
|
|
" %10 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int9 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %11 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.stft\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<tuple<int, int>>, %arg5: !torch.bool, %arg6: !torch.optional<bool>, %arg7: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: Unsupported dtype\"\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %int8 = torch.constant.int 8\n"
|
|
" %none = torch.constant.none\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.bool) {\n"
|
|
" %7 = torch.aten.__isnot__ %arg7, %none : !torch.optional<bool>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %7 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" %7 = torch.prim.unchecked_cast %arg7 : !torch.optional<bool> -> !torch.bool\n"
|
|
" torch.prim.If.yield %7 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %5:2 = torch.prim.If %4 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %1#1 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %7 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" %11 = torch.aten.__isnot__ %arg7, %none : !torch.optional<bool>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %11 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" %11 = torch.prim.unchecked_cast %arg7 : !torch.optional<bool> -> !torch.bool\n"
|
|
" %12 = torch.aten.ne.bool %11, %true : !torch.bool, !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %10:2 = torch.prim.If %9 -> (!torch.bool, !torch.int) {\n"
|
|
" %11 = torch.aten.eq.int %1#1, %int8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12:2 = torch.prim.If %11 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int5 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.eq.int %1#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14:2 = torch.prim.If %13 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int6 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.eq.int %1#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16:2 = torch.prim.If %15 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int7 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false, %0 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %16#0, %16#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %14#0, %14#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %12#0, %12#1 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %11 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.bool) {\n"
|
|
" %15 = torch.aten.__isnot__ %arg7, %none : !torch.optional<bool>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %15 = torch.prim.unchecked_cast %arg7 : !torch.optional<bool> -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %14:2 = torch.prim.If %13 -> (!torch.bool, !torch.int) {\n"
|
|
" %15 = torch.aten.eq.int %1#1, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16:2 = torch.prim.If %15 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int8 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %17 = torch.aten.eq.int %1#1, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18:2 = torch.prim.If %17 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int9 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %19 = torch.aten.eq.int %1#1, %int7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20:2 = torch.prim.If %19 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int10 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false, %0 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %20#0, %20#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %18#0, %18#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %16#0, %16#1 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %15 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.bool) {\n"
|
|
" %19 = torch.aten.__isnot__ %arg7, %none : !torch.optional<bool>, !torch.none -> !torch.bool\n"
|
|
" torch.prim.If.yield %19 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %17 = torch.prim.If %16 -> (!torch.bool) {\n"
|
|
" %19 = torch.prim.unchecked_cast %arg7 : !torch.optional<bool> -> !torch.bool\n"
|
|
" %20 = torch.aten.ne.bool %19, %true : !torch.bool, !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If.yield %20 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %18:2 = torch.prim.If %17 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %1#1 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" %19 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %20:2 = torch.prim.If %19 -> (!torch.bool, !torch.int) {\n"
|
|
" torch.prim.If.yield %true, %int9 : !torch.bool, !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false, %0 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %20#0, %20#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %18#0, %18#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %14#0, %14#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %10#0, %10#1 : !torch.bool, !torch.int\n"
|
|
" }\n"
|
|
" %6 = torch.prim.If %5#0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %5#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fft_ifft\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.int, %arg3: !torch.optional<str>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: Unsupported dtype\"\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int8 = torch.constant.int 8\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %1#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %4 = torch.aten.eq.int %1#1, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int8 : !torch.int\n"
|
|
" } else {\n"
|
|
" %6 = torch.aten.eq.int %1#1, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int9 : !torch.int\n"
|
|
" } else {\n"
|
|
" %8 = torch.aten.eq.int %1#1, %int7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int10 : !torch.int\n"
|
|
" } else {\n"
|
|
" %10 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int9 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %11 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.rsub.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.__and__.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.__and__.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.__or__.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.add.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bitwise_and.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bitwise_and.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bitwise_or.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bitwise_xor.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bitwise_right_shift.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bitwise_left_shift.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bmm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_priority_of_dtype(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_priority_of_dtype(%1#1) : (!torch.int) -> !torch.int\n"
|
|
" %4 = torch.aten.lt.int %2, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %1#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %5 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_priority_of_dtype(%arg0: !torch.int) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: Cannot determine priority of dtype\"\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int2 = torch.constant.int 2\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int8 = torch.constant.int 8\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1 = torch.aten.eq.int %arg0, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.eq.int %arg0, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %5 = torch.aten.eq.int %arg0, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %7 = torch.aten.eq.int %arg0, %int2 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.eq.int %arg0, %int3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" %11 = torch.aten.eq.int %arg0, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %12 = torch.prim.If %11 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int5 : !torch.int\n"
|
|
" } else {\n"
|
|
" %13 = torch.aten.eq.int %arg0, %int15 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %14 = torch.prim.If %13 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %15 = torch.aten.eq.int %arg0, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %16 = torch.prim.If %15 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int7 : !torch.int\n"
|
|
" } else {\n"
|
|
" %17 = torch.aten.eq.int %arg0, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %18 = torch.prim.If %17 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int8 : !torch.int\n"
|
|
" } else {\n"
|
|
" %19 = torch.aten.eq.int %arg0, %int7 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %20 = torch.prim.If %19 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int9 : !torch.int\n"
|
|
" } else {\n"
|
|
" %21 = torch.aten.eq.int %arg0, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %22 = torch.prim.If %21 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int10 : !torch.int\n"
|
|
" } else {\n"
|
|
" %23 = torch.aten.eq.int %arg0, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %24 = torch.prim.If %23 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int11 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %24 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %22 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %20 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %18 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %16 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %14 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %12 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %10 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %8 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %6 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.floor_divide\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: Result dtype for aten.floor_divide bool\"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: `other` cannot be complex\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: `self` cannot be complex\"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %3 = torch.aten.__not__ %2 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %5 = torch.aten.__not__ %4 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %7 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %8 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%6, %7) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %9 = torch.aten.ne.int %8, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %9 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %8 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.div.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%4) : (!torch.int) -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%4) : (!torch.int) -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" %10 = torch.aten.ne.int %4, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %10 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %9 : !torch.bool\n"
|
|
" }\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" }\n"
|
|
" return %7 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.div.Tensor_mode\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<str>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"trunc\"\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str_0 = torch.constant.str \"floor\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg2, %none : !torch.optional<str>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.bool) {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<str> -> !torch.str\n"
|
|
" %4 = torch.aten.eq.str %3, %str_0 : !torch.str, !torch.str -> !torch.bool\n"
|
|
" torch.prim.If.yield %4 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" %3 = func.call @\"__torch_mlir_dtype_fn.aten.floor_divide\"(%arg0, %arg1) : (!torch.tuple<int, int>, !torch.tuple<int, int>) -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %4:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct %4#0, %3#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %6 = torch.prim.ListConstruct %4#1, %3#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %7 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%5, %6) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%7) : (!torch.int) -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %12 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%7) : (!torch.int) -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %14 = torch.aten.ne.int %7, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %14 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %13 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %12 = torch.aten.__isnot__ %arg2, %none : !torch.optional<str>, !torch.none -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %14 = torch.prim.unchecked_cast %arg2 : !torch.optional<str> -> !torch.str\n"
|
|
" %15 = torch.aten.eq.str %14, %str : !torch.str, !torch.str -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %13 : !torch.bool\n"
|
|
" }\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %11 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.floor_divide.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %5 = torch.prim.ListConstruct %0#1, %4 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %6 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%3, %5) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.div.Scalar_mode\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.optional<str>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"trunc\"\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %str_0 = torch.constant.str \"floor\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg2, %none : !torch.optional<str>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.bool) {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<str> -> !torch.str\n"
|
|
" %4 = torch.aten.eq.str %3, %str_0 : !torch.str, !torch.str -> !torch.bool\n"
|
|
" torch.prim.If.yield %4 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" %3 = func.call @\"__torch_mlir_dtype_fn.aten.floor_divide.Scalar\"(%arg0, %arg1) : (!torch.tuple<int, int>, !torch.number) -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %4 = torch.prim.ListConstruct %none, %3#0 : (!torch.none, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %5 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %6 = torch.prim.ListConstruct %5, %3#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %7 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%4, %6) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%7) : (!torch.int) -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %12 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%7) : (!torch.int) -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %14 = torch.aten.ne.int %7, %int6 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %14 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %13 : !torch.bool\n"
|
|
" }\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %12 = torch.aten.__isnot__ %arg2, %none : !torch.optional<str>, !torch.none -> !torch.bool\n"
|
|
" %13 = torch.prim.If %12 -> (!torch.bool) {\n"
|
|
" %14 = torch.prim.unchecked_cast %arg2 : !torch.optional<str> -> !torch.str\n"
|
|
" %15 = torch.aten.eq.str %14, %str : !torch.str, !torch.str -> !torch.bool\n"
|
|
" torch.prim.If.yield %15 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %13 : !torch.bool\n"
|
|
" }\n"
|
|
" %11 = torch.prim.If %10 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %7 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %11 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.dot\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %1#1, %0#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %1#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.matmul\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_priority_of_dtype(%0#1) : (!torch.int) -> !torch.int\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_priority_of_dtype(%1#1) : (!torch.int) -> !torch.int\n"
|
|
" %4 = torch.aten.lt.int %2, %3 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %1#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %5 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.maximum\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.minimum\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fmax\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fmin\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.mm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %int15 = torch.constant.int 15\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %int15, %int5 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %3 = torch.aten.__contains__.int_list %2, %1#1 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" %7 = torch.aten.__contains__.int_list %2, %0#1 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %7 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" %7 = torch.aten.ne.int %1#1, %0#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %7 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int5 : !torch.int\n"
|
|
" } else {\n"
|
|
" %7 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %8 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %9 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%7, %8) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" }\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._int_mm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0#1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.eq.int %1#1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %int3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.mse_loss\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%4) : (!torch.int) -> !torch.bool\n"
|
|
" %6 = torch.aten.__not__ %5 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.mul.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.mv\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sub.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.threshold_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: Result dtype for aten.threshold_backward cannot be bool or float16\"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: `self` cannot be complex\"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_1 = torch.constant.str \"AssertionError: `grad_output` cannot be complex\"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %3 = torch.aten.__not__ %2 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_1, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %5 = torch.aten.__not__ %4 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %7 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %8 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%6, %7) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %9 = torch.prim.ListConstruct %int11 : (!torch.int) -> !torch.list<int>\n"
|
|
" %10 = torch.aten.__contains__.int_list %9, %8 : !torch.list<int>, !torch.int -> !torch.bool\n"
|
|
" %11 = torch.aten.__not__ %10 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %8 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._convolution\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>, %arg8: !torch.int, %arg9: !torch.bool, %arg10: !torch.bool, %arg11: !torch.bool, %arg12: !torch.bool) -> !torch.int {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.__isnot__ %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.__isnot__ %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %10 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %11 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%9, %10) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.conv1d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.int {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.__isnot__ %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.__isnot__ %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %10 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %11 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%9, %10) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.conv_tbc\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.int) -> !torch.int {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.__isnot__ %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.__isnot__ %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %10 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %11 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%9, %10) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._convolution.deprecated\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>, %arg8: !torch.int, %arg9: !torch.bool, %arg10: !torch.bool, %arg11: !torch.bool) -> !torch.int {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.__isnot__ %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.bool) {\n"
|
|
" %12 = torch.aten.__isnot__ %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %12 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %9 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %10 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %11 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%9, %10) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %11 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.conv2d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.conv3d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.conv_transpose1d\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int, %arg7: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.conv_transpose2d.input\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int, %arg7: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.conv_transpose3d.input\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.int, %arg7: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.convolution\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.bool, %arg7: !torch.list<int>, %arg8: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.convolution_backward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.optional<list<int>>, %arg4: !torch.list<int>, %arg5: !torch.list<int>, %arg6: !torch.list<int>, %arg7: !torch.bool, %arg8: !torch.list<int>, %arg9: !torch.int, %arg10: !torch.list<bool>) -> !torch.tuple<int, int, int> {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %0#1, %0#1 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" return %1 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bincount\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<tuple<int, int>>, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %5 = torch.aten.ne.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %5 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__is__ %arg1, %none : !torch.optional<tuple<int, int>>, !torch.none -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int7 : !torch.int\n"
|
|
" }\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.col2im\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.list<int>, %arg4: !torch.list<int>, %arg5: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.nonzero\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" return %int4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.nonzero_static\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" return %int4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.addmm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.number, %arg4: !torch.number) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg2 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#0, %1#0, %2#0 : (!torch.int, !torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %4 = torch.prim.ListConstruct %0#1, %1#1, %2#1 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%3, %4) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %5 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.lerp.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg2 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#0, %1#0, %2#0 : (!torch.int, !torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %4 = torch.prim.ListConstruct %0#1, %1#1, %2#1 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%3, %4) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %5 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.lerp.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0, %none : (!torch.int, !torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg2) : (!torch.number) -> !torch.int\n"
|
|
" %4 = torch.prim.ListConstruct %0#1, %1#1, %3 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %4) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %5 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.addcmul\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg2 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = torch.aten.ne.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.ne.int %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.aten.ne.int %2#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %5 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %6 = torch.prim.ListConstruct %0#0, %1#0, %2#0 : (!torch.int, !torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %7 = torch.prim.ListConstruct %0#1, %1#1, %2#1 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %8 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%6, %7) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %8 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.addcdiv\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.number) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg2 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#0, %1#0, %2#0 : (!torch.int, !torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %4 = torch.prim.ListConstruct %0#1, %1#1, %2#1 : (!torch.int, !torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%3, %4) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %6 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%5) : (!torch.int) -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %7 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.add.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sub.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.mul.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.div.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%4) : (!torch.int) -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fmod.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.fmod.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.pow.Scalar\"(%arg0: !torch.number, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %none, %0#0 : (!torch.none, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg0) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %2, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.pow.Tensor_Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.leaky_relu\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%3) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" %7 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.prim.ListConstruct %0#1, %3 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %6 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %5) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.elu\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number, %arg3: !torch.number) -> !torch.int {\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %3 = torch.prim.ListConstruct %arg1, %arg2, %arg3 : (!torch.number, !torch.number, !torch.number) -> !torch.list<number>\n"
|
|
" torch.prim.Loop %int3, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %7 = torch.aten.__getitem__.t %3, %arg4 : !torch.list<number>, !torch.int -> !torch.number\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%7) : (!torch.number) -> !torch.int\n"
|
|
" %9 = torch.aten.append.t %2, %8 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %4 = torch.prim.ListConstruct : () -> !torch.list<bool>\n"
|
|
" %5 = torch.aten.len.t %2 : !torch.list<int> -> !torch.int\n"
|
|
" torch.prim.Loop %5, %true, init() {\n"
|
|
" ^bb0(%arg4: !torch.int):\n"
|
|
" %7 = torch.aten.__getitem__.t %2, %arg4 : !torch.list<int>, !torch.int -> !torch.int\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%7) : (!torch.int) -> !torch.bool\n"
|
|
" %9 = torch.aten.append.t %4, %8 : !torch.list<bool>, !torch.bool -> !torch.list<bool>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %6 = torch.aten.any.bool %4 : !torch.list<bool> -> !torch.bool\n"
|
|
" torch.prim.If %6 -> () {\n"
|
|
" %7 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %8 = torch.aten.__not__ %7 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %8 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.selu\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.ne.int %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %3 = torch.aten.__not__ %2 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.remainder.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.remainder.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %1#0, %0#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %1#1, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.baddbmm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.number, %arg4: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg2 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.__isnot__ %0#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__isnot__ %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.eq.int %0#1, %1#1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %5 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %6 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %7 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%5, %6) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %7 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.where.self\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg2 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.where.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %0 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.bool) {\n"
|
|
" %4 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg2) : (!torch.number) -> !torch.int\n"
|
|
" %5 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%4) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If.yield %5 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %3 = torch.prim.If %2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" }\n"
|
|
" return %3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.where.ScalarOther\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %0#0, %none : (!torch.int, !torch.none) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg2) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %2 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.where.ScalarSelf\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg2 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.ListConstruct %none, %0#0 : (!torch.none, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = torch.prim.ListConstruct %2, %0#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%1, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.nan_to_num\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<float>, %arg2: !torch.optional<float>, %arg3: !torch.optional<float>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.nll_loss_forward\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.int, %arg4: !torch.int) -> !torch.tuple<int, int> {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.aten.eq.int %1#1, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.prim.TupleConstruct %0#1, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %3 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.native_layer_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.optional<tuple<int, int>>, %arg4: !torch.float) -> !torch.tuple<int, int, int> {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.eq.int %0#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" %5 = torch.aten.eq.int %0#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int7 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" %7 = torch.prim.TupleConstruct %0#1, %0#1, %6 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" return %7 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.one_hot\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int4 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %1 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %int4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.native_batch_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<tuple<int, int>>, %arg2: !torch.optional<tuple<int, int>>, %arg3: !torch.optional<tuple<int, int>>, %arg4: !torch.optional<tuple<int, int>>, %arg5: !torch.bool, %arg6: !torch.float, %arg7: !torch.float) -> !torch.tuple<int, int, int> {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" %3 = torch.prim.TupleConstruct %0#1, %0#1, %2 : !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int>\n"
|
|
" return %3 : !torch.tuple<int, int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.arange\"(%arg0: !torch.number, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg0) : (!torch.number) -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.arange.start\"(%arg0: !torch.number, %arg1: !torch.number, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg0) : (!torch.number) -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %6 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %7 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%6) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If.yield %7 : !torch.bool\n"
|
|
" }\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.arange.start_step\"(%arg0: !torch.number, %arg1: !torch.number, %arg2: !torch.number, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg0) : (!torch.number) -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %7 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%7) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If.yield %8 : !torch.bool\n"
|
|
" }\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.bool) {\n"
|
|
" torch.prim.If.yield %true : !torch.bool\n"
|
|
" } else {\n"
|
|
" %7 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg2) : (!torch.number) -> !torch.int\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%7) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If.yield %8 : !torch.bool\n"
|
|
" }\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %6 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sum\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%2#1) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %2#1 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.prod\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%2#1) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %2#1 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.sum.dim_IntList\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.int {\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.sum\"(%arg0, %arg3) : (!torch.tuple<int, int>, !torch.optional<int>) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.prod.dim_int\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%2#1) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %2#1 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.mean.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.sum\"(%arg0, %arg3) : (!torch.tuple<int, int>, !torch.optional<int>) -> !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.argmax\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" return %int4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.argmin\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" return %int4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.any.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int11 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.all.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int11 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.min\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.min.other\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.minimum\"(%arg0, %arg1) : (!torch.tuple<int, int>, !torch.tuple<int, int>) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max.other\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.maximum\"(%arg0, %arg1) : (!torch.tuple<int, int>, !torch.tuple<int, int>) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.amax\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.max\"(%arg0) : (!torch.tuple<int, int>) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.max.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.max\"(%arg0) : (!torch.tuple<int, int>) -> !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.amin\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.min\"(%arg0) : (!torch.tuple<int, int>) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.min.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.min\"(%arg0) : (!torch.tuple<int, int>) -> !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0, %int4 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.aminmax\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" return %1 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.mean\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>) -> !torch.int {\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.derefine %none : !torch.none to !torch.optional<list<int>>\n"
|
|
" %1 = call @\"__torch_mlir_dtype_fn.aten.mean.dim\"(%arg0, %0, %false, %arg1) : (!torch.tuple<int, int>, !torch.optional<list<int>>, !torch.bool, !torch.optional<int>) -> !torch.int\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.std\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.bool) -> !torch.int {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.eq.int %0#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int7 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.std.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.std.correction\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<number>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.var\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.bool) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.var.dim\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.bool, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.var.correction\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<number>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prims.var\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<float>, %arg3: !torch.optional<int>) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %0 = call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.linalg_vector_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.optional<list<int>>, %arg3: !torch.bool, %arg4: !torch.optional<int>) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__isnot__ %arg4, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" %5 = torch.prim.unchecked_cast %arg4 : !torch.optional<int> -> !torch.int\n"
|
|
" %6 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%5) : (!torch.int) -> !torch.bool\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" %10 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%5) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.prim.TupleConstruct %0#0, %5 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" %12 = func.call @\"__torch_mlir_dtype_fn.aten.std\"(%11, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" torch.prim.If.yield %12 : !torch.int\n"
|
|
" } else {\n"
|
|
" %10 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%5) : (!torch.int) -> !torch.bool\n"
|
|
" %11 = torch.aten.__not__ %10 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" } else {\n"
|
|
" %5 = func.call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.linalg_norm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<number>, %arg2: !torch.optional<list<int>>, %arg3: !torch.bool, %arg4: !torch.optional<int>) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.__isnot__ %arg4, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" %5 = torch.prim.unchecked_cast %arg4 : !torch.optional<int> -> !torch.int\n"
|
|
" %6 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%5) : (!torch.int) -> !torch.bool\n"
|
|
" %7 = torch.aten.__not__ %6 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %7 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %8 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %9 = torch.prim.If %8 -> (!torch.int) {\n"
|
|
" %10 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%5) : (!torch.int) -> !torch.bool\n"
|
|
" torch.prim.If %10 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %11 = torch.prim.TupleConstruct %0#0, %5 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" %12 = func.call @\"__torch_mlir_dtype_fn.aten.std\"(%11, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" torch.prim.If.yield %12 : !torch.int\n"
|
|
" } else {\n"
|
|
" %10 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%5) : (!torch.int) -> !torch.bool\n"
|
|
" %11 = torch.aten.__not__ %10 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %11 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %9 : !torch.int\n"
|
|
" } else {\n"
|
|
" %5 = func.call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.renorm\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.int, %arg3: !torch.number) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.norm.Scalar\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %int8 = torch.constant.int 8\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.eq.int %0#1, %int8 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int5 : !torch.int\n"
|
|
" } else {\n"
|
|
" %5 = func.call @\"__torch_mlir_dtype_fn.aten.std\"(%arg0, %true) : (!torch.tuple<int, int>, !torch.bool) -> !torch.int\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tensor.float\"(%arg0: !torch.float, %arg1: !torch.optional<int>, %arg2: !torch.optional<Device>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tensor.int\"(%arg0: !torch.int, %arg1: !torch.optional<int>, %arg2: !torch.optional<Device>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tensor.bool\"(%arg0: !torch.bool, %arg1: !torch.optional<int>, %arg2: !torch.optional<Device>, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int11 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.zeros\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.eye\"(%arg0: !torch.int, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.eye.m\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.ones\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.empty.memory_format\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.full\"(%arg0: !torch.list<int>, %arg1: !torch.number, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__isnot__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg1) : (!torch.number) -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.zeros_like\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.ones_like\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.empty_like\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.empty_strided\"(%arg0: !torch.list<int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.full_like\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.number, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>, %arg6: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.new_full\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.number, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.new_zeros\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.new_ones\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.new_empty\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.new_empty_strided\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>, %arg2: !torch.list<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.diag_embed\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.rand_like\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.randn_like\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.optional<int>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %5 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %5 : !torch.int\n"
|
|
" }\n"
|
|
" %3 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._to_copy\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.bool, %arg6: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.to.dtype\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool, %arg3: !torch.bool, %arg4: !torch.optional<int>) -> !torch.int {\n"
|
|
" return %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prims.convert_element_type\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" return %arg1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.to.dtype_layout\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>, %arg5: !torch.bool, %arg6: !torch.bool, %arg7: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.to.device\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.Device, %arg2: !torch.int, %arg3: !torch.bool, %arg4: !torch.bool, %arg5: !torch.optional<int>) -> !torch.int {\n"
|
|
" return %arg2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.to.other\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.bool, %arg3: !torch.bool, %arg4: !torch.optional<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._cast_Float\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.bool) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" return %int6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._cast_Long\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.bool) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" return %int4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.type_as\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.randint.low\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.list<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.randn\"(%arg0: !torch.list<int>, %arg1: !torch.optional<int>, %arg2: !torch.optional<int>, %arg3: !torch.optional<Device>, %arg4: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg1, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg1 : !torch.optional<int> -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.linspace\"(%arg0: !torch.number, %arg1: !torch.number, %arg2: !torch.int, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.normal_functional\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.float, %arg3: !torch.any) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.randn.generator\"(%arg0: !torch.list<int>, %arg1: !torch.any, %arg2: !torch.optional<int>, %arg3: !torch.optional<int>, %arg4: !torch.optional<Device>, %arg5: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" %3 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%2) : (!torch.int) -> !torch.bool\n"
|
|
" %4 = torch.aten.__not__ %3 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %4 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.var_mean.correction\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.optional<list<int>>, %arg2: !torch.optional<number>, %arg3: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.eq.int %0#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.tuple<int, int>) {\n"
|
|
" %5 = torch.prim.TupleConstruct %int6, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %5 : !torch.tuple<int, int>\n"
|
|
" } else {\n"
|
|
" %5 = torch.aten.eq.int %0#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.tuple<int, int>) {\n"
|
|
" %7 = torch.prim.TupleConstruct %int7, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %7 : !torch.tuple<int, int>\n"
|
|
" } else {\n"
|
|
" %7 = torch.prim.TupleConstruct %0#1, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %7 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %6 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" return %4 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.var_mean\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.bool) -> !torch.tuple<int, int> {\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %int10 = torch.constant.int 10\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %int9 = torch.constant.int 9\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.aten.__not__ %1 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %3 = torch.aten.eq.int %0#1, %int9 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.tuple<int, int>) {\n"
|
|
" %5 = torch.prim.TupleConstruct %int6, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %5 : !torch.tuple<int, int>\n"
|
|
" } else {\n"
|
|
" %5 = torch.aten.eq.int %0#1, %int10 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.tuple<int, int>) {\n"
|
|
" %7 = torch.prim.TupleConstruct %int7, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %7 : !torch.tuple<int, int>\n"
|
|
" } else {\n"
|
|
" %7 = torch.prim.TupleConstruct %0#1, %0#1 : !torch.int, !torch.int -> !torch.tuple<int, int>\n"
|
|
" torch.prim.If.yield %7 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %6 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" return %4 : !torch.tuple<int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tan\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.atan2\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%4) : (!torch.int) -> !torch.bool\n"
|
|
" %6 = torch.prim.If %5 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.atan\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.atanh\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.linear\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.optional<tuple<int, int>>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg1 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = torch.prim.ListConstruct %0#0, %1#0 : (!torch.int, !torch.int) -> !torch.list<optional<int>>\n"
|
|
" %3 = torch.prim.ListConstruct %0#1, %1#1 : (!torch.int, !torch.int) -> !torch.list<int>\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%2, %3) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.cat\"(%arg0: !torch.list<tuple<int, int>>, %arg1: !torch.int) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<optional<int>>\n"
|
|
" %1 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %2 = torch.aten.len.t %arg0 : !torch.list<tuple<int, int>> -> !torch.int\n"
|
|
" %3 = torch.aten.ne.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.len.t %arg0 : !torch.list<tuple<int, int>> -> !torch.int\n"
|
|
" torch.prim.Loop %4, %true, init() {\n"
|
|
" ^bb0(%arg2: !torch.int):\n"
|
|
" %6 = torch.aten.__getitem__.t %arg0, %arg2 : !torch.list<tuple<int, int>>, !torch.int -> !torch.tuple<int, int>\n"
|
|
" %7:2 = torch.prim.TupleUnpack %6 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %8 = torch.aten.append.t %0, %7#0 : !torch.list<optional<int>>, !torch.int -> !torch.list<optional<int>>\n"
|
|
" %9 = torch.aten.append.t %1, %7#1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%0, %1) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %5 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.atleast_1d\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.einsum\"(%arg0: !torch.str, %arg1: !torch.list<tuple<int, int>>, %arg2: !torch.optional<list<int>>) -> !torch.int {\n"
|
|
" %true = torch.constant.bool true\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0 = torch.prim.ListConstruct : () -> !torch.list<optional<int>>\n"
|
|
" %1 = torch.prim.ListConstruct : () -> !torch.list<int>\n"
|
|
" %2 = torch.aten.len.t %arg1 : !torch.list<tuple<int, int>> -> !torch.int\n"
|
|
" %3 = torch.aten.ne.int %2, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = torch.aten.len.t %arg1 : !torch.list<tuple<int, int>> -> !torch.int\n"
|
|
" torch.prim.Loop %4, %true, init() {\n"
|
|
" ^bb0(%arg3: !torch.int):\n"
|
|
" %6 = torch.aten.__getitem__.t %arg1, %arg3 : !torch.list<tuple<int, int>>, !torch.int -> !torch.tuple<int, int>\n"
|
|
" %7:2 = torch.prim.TupleUnpack %6 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %8 = torch.aten.append.t %0, %7#0 : !torch.list<optional<int>>, !torch.int -> !torch.list<optional<int>>\n"
|
|
" %9 = torch.aten.append.t %1, %7#1 : !torch.list<int>, !torch.int -> !torch.list<int>\n"
|
|
" torch.prim.Loop.condition %true, iter()\n"
|
|
" } : (!torch.int, !torch.bool) -> ()\n"
|
|
" %5 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.promote_dtypes(%0, %1) : (!torch.list<optional<int>>, !torch.list<int>) -> !torch.int\n"
|
|
" return %5 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.trace\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%0#1) : (!torch.int) -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._shape_as_tensor\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" return %int4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.ScalarImplicit\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %str = torch.constant.str \"AssertionError: Unexpected dtype!\"\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %false = torch.constant.bool false\n"
|
|
" %int11 = torch.constant.int 11\n"
|
|
" %int7 = torch.constant.int 7\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str_0 = torch.constant.str \"AssertionError: \"\n"
|
|
" %0 = torch.prim.Uninitialized : !torch.int\n"
|
|
" %1:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %2 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_complex_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %3 = torch.aten.__not__ %2 : !torch.bool -> !torch.bool\n"
|
|
" torch.prim.If %3 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str_0, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" %4 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_float_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %5 = torch.prim.If %4 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int7 : !torch.int\n"
|
|
" } else {\n"
|
|
" %6 = func.call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.is_integer_dtype(%1#1) : (!torch.int) -> !torch.bool\n"
|
|
" %7 = torch.prim.If %6 -> (!torch.bool) {\n"
|
|
" %9 = torch.aten.ne.int %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If.yield %9 : !torch.bool\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %false : !torch.bool\n"
|
|
" }\n"
|
|
" %8 = torch.prim.If %7 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" %9 = torch.aten.eq.int %1#1, %int11 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %10 = torch.prim.If %9 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int11 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield %0 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %10 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %8 : !torch.int\n"
|
|
" }\n"
|
|
" return %5 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prim.NumToTensor.Scalar\"(%arg0: !torch.number) -> !torch.int {\n"
|
|
" %0 = call @__torch__.torch_mlir.jit_ir_importer.build_tools.library_generator.get_dtype_of_scalar(%arg0) : (!torch.number) -> !torch.int\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.softmax.int\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._softmax\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.If %arg2 -> (!torch.int) {\n"
|
|
" %2 = torch.aten.eq.int %0#1, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._log_softmax\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.bool) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" %none = torch.constant.none\n"
|
|
" %str = torch.constant.str \"AssertionError: \"\n"
|
|
" %int5 = torch.constant.int 5\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.If %arg2 -> (!torch.int) {\n"
|
|
" %2 = torch.aten.eq.int %0#1, %int5 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" torch.prim.If %2 -> () {\n"
|
|
" torch.prim.If.yield\n"
|
|
" } else {\n"
|
|
" torch.prim.RaiseException %str, %none : !torch.str, !torch.none\n"
|
|
" torch.prim.If.yield\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %int6 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.log_softmax.int\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.optional<int>) -> !torch.int {\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.__is__ %arg2, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %0#1 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.prim.unchecked_cast %arg2 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %3 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.embedding\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.int, %arg3: !torch.bool, %arg4: !torch.bool) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._embedding_bag\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.bool, %arg4: !torch.int, %arg5: !torch.bool, %arg6: !torch.optional<tuple<int, int>>, %arg7: !torch.bool, %arg8: !torch.int) -> !torch.tuple<int, int, int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4, %int4, %int4 : !torch.int, !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int, int>\n"
|
|
" return %1 : !torch.tuple<int, int, int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.embedding_bag.padding_idx\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.bool, %arg4: !torch.int, %arg5: !torch.bool, %arg6: !torch.optional<tuple<int, int>>, %arg7: !torch.bool, %arg8: !torch.optional<int>) -> !torch.tuple<int, int, int, int> {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.prim.TupleConstruct %0#1, %int4, %int4, %int4 : !torch.int, !torch.int, !torch.int, !torch.int -> !torch.tuple<int, int, int, int>\n"
|
|
" return %1 : !torch.tuple<int, int, int, int>\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.bucketize.Tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.bool, %arg3: !torch.bool) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %0 = torch.prim.If %arg2 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int3 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" }\n"
|
|
" return %0 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prims.squeeze\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.list<int>) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.prims.collapse\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.int, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" return %0#1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.quantize_per_channel\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.int, %arg4: !torch.int) -> !torch.int {\n"
|
|
" return %arg4 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.quantize_per_tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.int, %arg3: !torch.int) -> !torch.int {\n"
|
|
" return %arg3 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.dequantize.self\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" return %int6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.dequantize.tensor\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int6 = torch.constant.int 6\n"
|
|
" return %int6 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.triu_indices\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.tril_indices\"(%arg0: !torch.int, %arg1: !torch.int, %arg2: !torch.int, %arg3: !torch.optional<int>, %arg4: !torch.optional<int>, %arg5: !torch.optional<Device>, %arg6: !torch.optional<bool>) -> !torch.int {\n"
|
|
" %int4 = torch.constant.int 4\n"
|
|
" %none = torch.constant.none\n"
|
|
" %0 = torch.aten.__is__ %arg3, %none : !torch.optional<int>, !torch.none -> !torch.bool\n"
|
|
" %1 = torch.prim.If %0 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int4 : !torch.int\n"
|
|
" } else {\n"
|
|
" %2 = torch.prim.unchecked_cast %arg3 : !torch.optional<int> -> !torch.int\n"
|
|
" torch.prim.If.yield %2 : !torch.int\n"
|
|
" }\n"
|
|
" return %1 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten.int_repr\"(%arg0: !torch.tuple<int, int>) -> !torch.int {\n"
|
|
" %int3 = torch.constant.int 3\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int12 = torch.constant.int 12\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %int13 = torch.constant.int 13\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int13 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int0 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.eq.int %0#1, %int12 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int1 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int3 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._make_per_channel_quantized_tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.tuple<int, int>, %arg2: !torch.tuple<int, int>, %arg3: !torch.int) -> !torch.int {\n"
|
|
" %int14 = torch.constant.int 14\n"
|
|
" %int12 = torch.constant.int 12\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int13 = torch.constant.int 13\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int13 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.eq.int %0#1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int12 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int14 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
" func.func @\"__torch_mlir_dtype_fn.aten._make_per_tensor_quantized_tensor\"(%arg0: !torch.tuple<int, int>, %arg1: !torch.float, %arg2: !torch.int) -> !torch.int {\n"
|
|
" %int14 = torch.constant.int 14\n"
|
|
" %int12 = torch.constant.int 12\n"
|
|
" %int1 = torch.constant.int 1\n"
|
|
" %int13 = torch.constant.int 13\n"
|
|
" %int0 = torch.constant.int 0\n"
|
|
" %0:2 = torch.prim.TupleUnpack %arg0 : !torch.tuple<int, int> -> !torch.int, !torch.int\n"
|
|
" %1 = torch.aten.eq.int %0#1, %int0 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %2 = torch.prim.If %1 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int13 : !torch.int\n"
|
|
" } else {\n"
|
|
" %3 = torch.aten.eq.int %0#1, %int1 : !torch.int, !torch.int -> !torch.bool\n"
|
|
" %4 = torch.prim.If %3 -> (!torch.int) {\n"
|
|
" torch.prim.If.yield %int12 : !torch.int\n"
|
|
" } else {\n"
|
|
" torch.prim.If.yield %int14 : !torch.int\n"
|
|
" }\n"
|
|
" torch.prim.If.yield %4 : !torch.int\n"
|
|
" }\n"
|
|
" return %2 : !torch.int\n"
|
|
" }\n"
|
|
"}\n"
|
|
"";
|
|
// clang-format on
|
|
#if defined(__clang__)
|
|
#pragma clang diagnostic pop
|
|
#endif
|
|
}
|