Created
May 8, 2024 06:10
-
-
Save pashu123/a62a924bf6ef86cb515c9b2b34648bf2 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -----// IR Dump After AssignTargetDevicesPass (iree-hal-assign-target-devices) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
} | |
// -----// IR Dump After SetStrictSymbolicShapesPass (torch-iree-set-strict-symbolic-shapes) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After BitCastQuantTensorPass (torch-iree-bitcast-quant-tensor) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ReduceOpVariants (torch-reduce-op-variants) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ConvertCustomQuantOp (torch-convert-custom-quant-op) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After DecomposeComplexOps (torch-decompose-complex-ops) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ConvertTorchToTMTensor (convert-torch-to-tmtensor) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ConvertTMTensorToLinalgExt (torch-iree-tm-tensor-to-linalg-ext) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ConvertTorchToTensor (convert-torch-to-tensor) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%0 = torch.aten.size.int %arg1, %int1 : !torch.vtensor<[4,?],si64>, !torch.int -> !torch.int | |
%1 = torch.prim.ListConstruct %int4, %0, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%2 = torch.aten.view %arg0, %1 : !torch.vtensor<[4,?,32,100],f32>, !torch.list<int> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %2 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ConvertTorchToLinalg (convert-torch-to-linalg) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%2 = torch_c.to_i64 %int1 | |
%c2_i64 = arith.constant 2 : i64 | |
%3 = arith.addi %2, %c2_i64 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%4 = arith.cmpi sge, %2, %c0_i64 : i64 | |
%5 = arith.select %4, %2, %3 : i64 | |
%6 = arith.index_cast %5 : i64 to index | |
%dim = tensor.dim %0, %6 : tensor<4x?xi64> | |
%7 = arith.index_cast %dim : index to i64 | |
%8 = torch_c.from_i64 %7 | |
%9 = torch.prim.ListConstruct %int4, %8, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64_0 = arith.constant 0 : i64 | |
%10 = torch_c.to_i64 %int4 | |
%11 = arith.muli %c1_i64, %10 : i64 | |
%12 = arith.addi %c0_i64_0, %c1_i64 : i64 | |
%13 = arith.cmpi slt, %10, %c0_i64_0 : i64 | |
%14 = arith.select %13, %c1_i64, %11 : i64 | |
%15 = arith.select %13, %12, %c0_i64_0 : i64 | |
%16 = torch_c.to_i64 %8 | |
%17 = arith.muli %14, %16 : i64 | |
%18 = arith.addi %15, %c1_i64 : i64 | |
%19 = arith.cmpi slt, %16, %c0_i64_0 : i64 | |
%20 = arith.select %19, %14, %17 : i64 | |
%21 = arith.select %19, %18, %15 : i64 | |
%22 = torch_c.to_i64 %int32 | |
%23 = arith.muli %20, %22 : i64 | |
%24 = arith.addi %21, %c1_i64 : i64 | |
%25 = arith.cmpi slt, %22, %c0_i64_0 : i64 | |
%26 = arith.select %25, %20, %23 : i64 | |
%27 = arith.select %25, %24, %21 : i64 | |
%28 = torch_c.to_i64 %int-1 | |
%29 = arith.muli %26, %28 : i64 | |
%30 = arith.addi %27, %c1_i64 : i64 | |
%31 = arith.cmpi slt, %28, %c0_i64_0 : i64 | |
%32 = arith.select %31, %26, %29 : i64 | |
%33 = arith.select %31, %30, %27 : i64 | |
%34 = torch_c.to_i64 %int2 | |
%35 = arith.muli %32, %34 : i64 | |
%36 = arith.addi %33, %c1_i64 : i64 | |
%37 = arith.cmpi slt, %34, %c0_i64_0 : i64 | |
%38 = arith.select %37, %32, %35 : i64 | |
%39 = arith.select %37, %36, %33 : i64 | |
%40 = arith.cmpi sle, %39, %c1_i64 : i64 | |
cf.assert %40, "must have at most one inferred (negative) dimension" | |
%c0 = arith.constant 0 : index | |
%dim_1 = tensor.dim %1, %c0 : tensor<4x?x32x100xf32> | |
%41 = arith.index_cast %dim_1 : index to i64 | |
%42 = arith.muli %c1_i64, %41 : i64 | |
%c1 = arith.constant 1 : index | |
%dim_2 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%43 = arith.index_cast %dim_2 : index to i64 | |
%44 = arith.muli %42, %43 : i64 | |
%c2 = arith.constant 2 : index | |
%dim_3 = tensor.dim %1, %c2 : tensor<4x?x32x100xf32> | |
%45 = arith.index_cast %dim_3 : index to i64 | |
%46 = arith.muli %44, %45 : i64 | |
%c3 = arith.constant 3 : index | |
%dim_4 = tensor.dim %1, %c3 : tensor<4x?x32x100xf32> | |
%47 = arith.index_cast %dim_4 : index to i64 | |
%48 = arith.muli %46, %47 : i64 | |
%49 = arith.divsi %48, %38 : i64 | |
%50 = arith.cmpi slt, %10, %c0_i64_0 : i64 | |
%51 = arith.select %50, %49, %10 : i64 | |
%52 = arith.cmpi slt, %16, %c0_i64_0 : i64 | |
%53 = arith.select %52, %49, %16 : i64 | |
%54 = arith.cmpi slt, %22, %c0_i64_0 : i64 | |
%55 = arith.select %54, %49, %22 : i64 | |
%56 = arith.cmpi slt, %28, %c0_i64_0 : i64 | |
%57 = arith.select %56, %49, %28 : i64 | |
%58 = arith.cmpi slt, %34, %c0_i64_0 : i64 | |
%59 = arith.select %58, %49, %34 : i64 | |
%from_elements = tensor.from_elements %51, %53, %55, %57, %59 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%60 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %60 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ConvertTorchToSCF (convert-torch-to-scf) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%int4 = torch.constant.int 4 | |
%int32 = torch.constant.int 32 | |
%int-1 = torch.constant.int -1 | |
%int2 = torch.constant.int 2 | |
%int1 = torch.constant.int 1 | |
%2 = torch_c.to_i64 %int1 | |
%c2_i64 = arith.constant 2 : i64 | |
%3 = arith.addi %2, %c2_i64 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%4 = arith.cmpi sge, %2, %c0_i64 : i64 | |
%5 = arith.select %4, %2, %3 : i64 | |
%6 = arith.index_cast %5 : i64 to index | |
%dim = tensor.dim %0, %6 : tensor<4x?xi64> | |
%7 = arith.index_cast %dim : index to i64 | |
%8 = torch_c.from_i64 %7 | |
%9 = torch.prim.ListConstruct %int4, %8, %int32, %int-1, %int2 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64_0 = arith.constant 0 : i64 | |
%10 = torch_c.to_i64 %int4 | |
%11 = arith.muli %c1_i64, %10 : i64 | |
%12 = arith.addi %c0_i64_0, %c1_i64 : i64 | |
%13 = arith.cmpi slt, %10, %c0_i64_0 : i64 | |
%14 = arith.select %13, %c1_i64, %11 : i64 | |
%15 = arith.select %13, %12, %c0_i64_0 : i64 | |
%16 = torch_c.to_i64 %8 | |
%17 = arith.muli %14, %16 : i64 | |
%18 = arith.addi %15, %c1_i64 : i64 | |
%19 = arith.cmpi slt, %16, %c0_i64_0 : i64 | |
%20 = arith.select %19, %14, %17 : i64 | |
%21 = arith.select %19, %18, %15 : i64 | |
%22 = torch_c.to_i64 %int32 | |
%23 = arith.muli %20, %22 : i64 | |
%24 = arith.addi %21, %c1_i64 : i64 | |
%25 = arith.cmpi slt, %22, %c0_i64_0 : i64 | |
%26 = arith.select %25, %20, %23 : i64 | |
%27 = arith.select %25, %24, %21 : i64 | |
%28 = torch_c.to_i64 %int-1 | |
%29 = arith.muli %26, %28 : i64 | |
%30 = arith.addi %27, %c1_i64 : i64 | |
%31 = arith.cmpi slt, %28, %c0_i64_0 : i64 | |
%32 = arith.select %31, %26, %29 : i64 | |
%33 = arith.select %31, %30, %27 : i64 | |
%34 = torch_c.to_i64 %int2 | |
%35 = arith.muli %32, %34 : i64 | |
%36 = arith.addi %33, %c1_i64 : i64 | |
%37 = arith.cmpi slt, %34, %c0_i64_0 : i64 | |
%38 = arith.select %37, %32, %35 : i64 | |
%39 = arith.select %37, %36, %33 : i64 | |
%40 = arith.cmpi sle, %39, %c1_i64 : i64 | |
cf.assert %40, "must have at most one inferred (negative) dimension" | |
%c0 = arith.constant 0 : index | |
%c4 = arith.constant 4 : index | |
%41 = arith.index_cast %c4 : index to i64 | |
%42 = arith.muli %c1_i64, %41 : i64 | |
%c1 = arith.constant 1 : index | |
%dim_1 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%43 = arith.index_cast %dim_1 : index to i64 | |
%44 = arith.muli %42, %43 : i64 | |
%c2 = arith.constant 2 : index | |
%c32 = arith.constant 32 : index | |
%45 = arith.index_cast %c32 : index to i64 | |
%46 = arith.muli %44, %45 : i64 | |
%c3 = arith.constant 3 : index | |
%c100 = arith.constant 100 : index | |
%47 = arith.index_cast %c100 : index to i64 | |
%48 = arith.muli %46, %47 : i64 | |
%49 = arith.divsi %48, %38 : i64 | |
%50 = arith.cmpi slt, %10, %c0_i64_0 : i64 | |
%51 = arith.select %50, %49, %10 : i64 | |
%52 = arith.cmpi slt, %16, %c0_i64_0 : i64 | |
%53 = arith.select %52, %49, %16 : i64 | |
%54 = arith.cmpi slt, %22, %c0_i64_0 : i64 | |
%55 = arith.select %54, %49, %22 : i64 | |
%56 = arith.cmpi slt, %28, %c0_i64_0 : i64 | |
%57 = arith.select %56, %49, %28 : i64 | |
%58 = arith.cmpi slt, %34, %c0_i64_0 : i64 | |
%59 = arith.select %58, %49, %34 : i64 | |
%from_elements = tensor.from_elements %51, %53, %55, %57, %59 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%60 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %60 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ConvertTorchToArith (convert-torch-to-arith) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%c4_i64 = arith.constant 4 : i64 | |
%2 = torch_c.from_i64 %c4_i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%3 = torch_c.from_i64 %c32_i64 | |
%c-1_i64 = arith.constant -1 : i64 | |
%4 = torch_c.from_i64 %c-1_i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%5 = torch_c.from_i64 %c2_i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%6 = torch_c.from_i64 %c1_i64 | |
%7 = torch_c.to_i64 %6 | |
%c2_i64_0 = arith.constant 2 : i64 | |
%8 = arith.addi %7, %c2_i64_0 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%9 = arith.cmpi sge, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %7, %8 : i64 | |
%11 = arith.index_cast %10 : i64 to index | |
%dim = tensor.dim %0, %11 : tensor<4x?xi64> | |
%12 = arith.index_cast %dim : index to i64 | |
%13 = torch_c.from_i64 %12 | |
%14 = torch.prim.ListConstruct %2, %13, %3, %4, %5 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%c1_i64_1 = arith.constant 1 : i64 | |
%c0_i64_2 = arith.constant 0 : i64 | |
%15 = torch_c.to_i64 %2 | |
%16 = arith.muli %c1_i64_1, %15 : i64 | |
%17 = arith.addi %c0_i64_2, %c1_i64_1 : i64 | |
%18 = arith.cmpi slt, %15, %c0_i64_2 : i64 | |
%19 = arith.select %18, %c1_i64_1, %16 : i64 | |
%20 = arith.select %18, %17, %c0_i64_2 : i64 | |
%21 = torch_c.to_i64 %13 | |
%22 = arith.muli %19, %21 : i64 | |
%23 = arith.addi %20, %c1_i64_1 : i64 | |
%24 = arith.cmpi slt, %21, %c0_i64_2 : i64 | |
%25 = arith.select %24, %19, %22 : i64 | |
%26 = arith.select %24, %23, %20 : i64 | |
%27 = torch_c.to_i64 %3 | |
%28 = arith.muli %25, %27 : i64 | |
%29 = arith.addi %26, %c1_i64_1 : i64 | |
%30 = arith.cmpi slt, %27, %c0_i64_2 : i64 | |
%31 = arith.select %30, %25, %28 : i64 | |
%32 = arith.select %30, %29, %26 : i64 | |
%33 = torch_c.to_i64 %4 | |
%34 = arith.muli %31, %33 : i64 | |
%35 = arith.addi %32, %c1_i64_1 : i64 | |
%36 = arith.cmpi slt, %33, %c0_i64_2 : i64 | |
%37 = arith.select %36, %31, %34 : i64 | |
%38 = arith.select %36, %35, %32 : i64 | |
%39 = torch_c.to_i64 %5 | |
%40 = arith.muli %37, %39 : i64 | |
%41 = arith.addi %38, %c1_i64_1 : i64 | |
%42 = arith.cmpi slt, %39, %c0_i64_2 : i64 | |
%43 = arith.select %42, %37, %40 : i64 | |
%44 = arith.select %42, %41, %38 : i64 | |
%45 = arith.cmpi sle, %44, %c1_i64_1 : i64 | |
cf.assert %45, "must have at most one inferred (negative) dimension" | |
%c0 = arith.constant 0 : index | |
%c4 = arith.constant 4 : index | |
%46 = arith.index_cast %c4 : index to i64 | |
%47 = arith.muli %c1_i64_1, %46 : i64 | |
%c1 = arith.constant 1 : index | |
%dim_3 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%48 = arith.index_cast %dim_3 : index to i64 | |
%49 = arith.muli %47, %48 : i64 | |
%c2 = arith.constant 2 : index | |
%c32 = arith.constant 32 : index | |
%50 = arith.index_cast %c32 : index to i64 | |
%51 = arith.muli %49, %50 : i64 | |
%c3 = arith.constant 3 : index | |
%c100 = arith.constant 100 : index | |
%52 = arith.index_cast %c100 : index to i64 | |
%53 = arith.muli %51, %52 : i64 | |
%54 = arith.divsi %53, %43 : i64 | |
%55 = arith.cmpi slt, %15, %c0_i64_2 : i64 | |
%56 = arith.select %55, %54, %15 : i64 | |
%57 = arith.cmpi slt, %21, %c0_i64_2 : i64 | |
%58 = arith.select %57, %54, %21 : i64 | |
%59 = arith.cmpi slt, %27, %c0_i64_2 : i64 | |
%60 = arith.select %59, %54, %27 : i64 | |
%61 = arith.cmpi slt, %33, %c0_i64_2 : i64 | |
%62 = arith.select %61, %54, %33 : i64 | |
%63 = arith.cmpi slt, %39, %c0_i64_2 : i64 | |
%64 = arith.select %63, %54, %39 : i64 | |
%from_elements = tensor.from_elements %56, %58, %60, %62, %64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%65 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %65 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ConvertTorchConversionToMLProgram (convert-torch-conversion-to-mlprogram) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
ml_program.global private mutable @global_seed(dense<0> : tensor<i64>) : tensor<i64> | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%c4_i64 = arith.constant 4 : i64 | |
%2 = torch_c.from_i64 %c4_i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%3 = torch_c.from_i64 %c32_i64 | |
%c-1_i64 = arith.constant -1 : i64 | |
%4 = torch_c.from_i64 %c-1_i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%5 = torch_c.from_i64 %c2_i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%6 = torch_c.from_i64 %c1_i64 | |
%7 = torch_c.to_i64 %6 | |
%c2_i64_0 = arith.constant 2 : i64 | |
%8 = arith.addi %7, %c2_i64_0 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%9 = arith.cmpi sge, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %7, %8 : i64 | |
%11 = arith.index_cast %10 : i64 to index | |
%dim = tensor.dim %0, %11 : tensor<4x?xi64> | |
%12 = arith.index_cast %dim : index to i64 | |
%13 = torch_c.from_i64 %12 | |
%14 = torch.prim.ListConstruct %2, %13, %3, %4, %5 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%c1_i64_1 = arith.constant 1 : i64 | |
%c0_i64_2 = arith.constant 0 : i64 | |
%15 = torch_c.to_i64 %2 | |
%16 = arith.muli %c1_i64_1, %15 : i64 | |
%17 = arith.addi %c0_i64_2, %c1_i64_1 : i64 | |
%18 = arith.cmpi slt, %15, %c0_i64_2 : i64 | |
%19 = arith.select %18, %c1_i64_1, %16 : i64 | |
%20 = arith.select %18, %17, %c0_i64_2 : i64 | |
%21 = torch_c.to_i64 %13 | |
%22 = arith.muli %19, %21 : i64 | |
%23 = arith.addi %20, %c1_i64_1 : i64 | |
%24 = arith.cmpi slt, %21, %c0_i64_2 : i64 | |
%25 = arith.select %24, %19, %22 : i64 | |
%26 = arith.select %24, %23, %20 : i64 | |
%27 = torch_c.to_i64 %3 | |
%28 = arith.muli %25, %27 : i64 | |
%29 = arith.addi %26, %c1_i64_1 : i64 | |
%30 = arith.cmpi slt, %27, %c0_i64_2 : i64 | |
%31 = arith.select %30, %25, %28 : i64 | |
%32 = arith.select %30, %29, %26 : i64 | |
%33 = torch_c.to_i64 %4 | |
%34 = arith.muli %31, %33 : i64 | |
%35 = arith.addi %32, %c1_i64_1 : i64 | |
%36 = arith.cmpi slt, %33, %c0_i64_2 : i64 | |
%37 = arith.select %36, %31, %34 : i64 | |
%38 = arith.select %36, %35, %32 : i64 | |
%39 = torch_c.to_i64 %5 | |
%40 = arith.muli %37, %39 : i64 | |
%41 = arith.addi %38, %c1_i64_1 : i64 | |
%42 = arith.cmpi slt, %39, %c0_i64_2 : i64 | |
%43 = arith.select %42, %37, %40 : i64 | |
%44 = arith.select %42, %41, %38 : i64 | |
%45 = arith.cmpi sle, %44, %c1_i64_1 : i64 | |
cf.assert %45, "must have at most one inferred (negative) dimension" | |
%c0 = arith.constant 0 : index | |
%c4 = arith.constant 4 : index | |
%46 = arith.index_cast %c4 : index to i64 | |
%47 = arith.muli %c1_i64_1, %46 : i64 | |
%c1 = arith.constant 1 : index | |
%dim_3 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%48 = arith.index_cast %dim_3 : index to i64 | |
%49 = arith.muli %47, %48 : i64 | |
%c2 = arith.constant 2 : index | |
%c32 = arith.constant 32 : index | |
%50 = arith.index_cast %c32 : index to i64 | |
%51 = arith.muli %49, %50 : i64 | |
%c3 = arith.constant 3 : index | |
%c100 = arith.constant 100 : index | |
%52 = arith.index_cast %c100 : index to i64 | |
%53 = arith.muli %51, %52 : i64 | |
%54 = arith.divsi %53, %43 : i64 | |
%55 = arith.cmpi slt, %15, %c0_i64_2 : i64 | |
%56 = arith.select %55, %54, %15 : i64 | |
%57 = arith.cmpi slt, %21, %c0_i64_2 : i64 | |
%58 = arith.select %57, %54, %21 : i64 | |
%59 = arith.cmpi slt, %27, %c0_i64_2 : i64 | |
%60 = arith.select %59, %54, %27 : i64 | |
%61 = arith.cmpi slt, %33, %c0_i64_2 : i64 | |
%62 = arith.select %61, %54, %33 : i64 | |
%63 = arith.cmpi slt, %39, %c0_i64_2 : i64 | |
%64 = arith.select %63, %54, %39 : i64 | |
%from_elements = tensor.from_elements %56, %58, %60, %62, %64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%65 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %65 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
} | |
// -----// IR Dump After ExpandOps (memref-expand) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%c4_i64 = arith.constant 4 : i64 | |
%2 = torch_c.from_i64 %c4_i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%3 = torch_c.from_i64 %c32_i64 | |
%c-1_i64 = arith.constant -1 : i64 | |
%4 = torch_c.from_i64 %c-1_i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%5 = torch_c.from_i64 %c2_i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%6 = torch_c.from_i64 %c1_i64 | |
%7 = torch_c.to_i64 %6 | |
%c2_i64_0 = arith.constant 2 : i64 | |
%8 = arith.addi %7, %c2_i64_0 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%9 = arith.cmpi sge, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %7, %8 : i64 | |
%11 = arith.index_cast %10 : i64 to index | |
%dim = tensor.dim %0, %11 : tensor<4x?xi64> | |
%12 = arith.index_cast %dim : index to i64 | |
%13 = torch_c.from_i64 %12 | |
%14 = torch.prim.ListConstruct %2, %13, %3, %4, %5 : (!torch.int, !torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int> | |
%c1_i64_1 = arith.constant 1 : i64 | |
%c0_i64_2 = arith.constant 0 : i64 | |
%15 = torch_c.to_i64 %2 | |
%16 = arith.muli %c1_i64_1, %15 : i64 | |
%17 = arith.addi %c0_i64_2, %c1_i64_1 : i64 | |
%18 = arith.cmpi slt, %15, %c0_i64_2 : i64 | |
%19 = arith.select %18, %c1_i64_1, %16 : i64 | |
%20 = arith.select %18, %17, %c0_i64_2 : i64 | |
%21 = torch_c.to_i64 %13 | |
%22 = arith.muli %19, %21 : i64 | |
%23 = arith.addi %20, %c1_i64_1 : i64 | |
%24 = arith.cmpi slt, %21, %c0_i64_2 : i64 | |
%25 = arith.select %24, %19, %22 : i64 | |
%26 = arith.select %24, %23, %20 : i64 | |
%27 = torch_c.to_i64 %3 | |
%28 = arith.muli %25, %27 : i64 | |
%29 = arith.addi %26, %c1_i64_1 : i64 | |
%30 = arith.cmpi slt, %27, %c0_i64_2 : i64 | |
%31 = arith.select %30, %25, %28 : i64 | |
%32 = arith.select %30, %29, %26 : i64 | |
%33 = torch_c.to_i64 %4 | |
%34 = arith.muli %31, %33 : i64 | |
%35 = arith.addi %32, %c1_i64_1 : i64 | |
%36 = arith.cmpi slt, %33, %c0_i64_2 : i64 | |
%37 = arith.select %36, %31, %34 : i64 | |
%38 = arith.select %36, %35, %32 : i64 | |
%39 = torch_c.to_i64 %5 | |
%40 = arith.muli %37, %39 : i64 | |
%41 = arith.addi %38, %c1_i64_1 : i64 | |
%42 = arith.cmpi slt, %39, %c0_i64_2 : i64 | |
%43 = arith.select %42, %37, %40 : i64 | |
%44 = arith.select %42, %41, %38 : i64 | |
%45 = arith.cmpi sle, %44, %c1_i64_1 : i64 | |
cf.assert %45, "must have at most one inferred (negative) dimension" | |
%c0 = arith.constant 0 : index | |
%c4 = arith.constant 4 : index | |
%46 = arith.index_cast %c4 : index to i64 | |
%47 = arith.muli %c1_i64_1, %46 : i64 | |
%c1 = arith.constant 1 : index | |
%dim_3 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%48 = arith.index_cast %dim_3 : index to i64 | |
%49 = arith.muli %47, %48 : i64 | |
%c2 = arith.constant 2 : index | |
%c32 = arith.constant 32 : index | |
%50 = arith.index_cast %c32 : index to i64 | |
%51 = arith.muli %49, %50 : i64 | |
%c3 = arith.constant 3 : index | |
%c100 = arith.constant 100 : index | |
%52 = arith.index_cast %c100 : index to i64 | |
%53 = arith.muli %51, %52 : i64 | |
%54 = arith.divsi %53, %43 : i64 | |
%55 = arith.cmpi slt, %15, %c0_i64_2 : i64 | |
%56 = arith.select %55, %54, %15 : i64 | |
%57 = arith.cmpi slt, %21, %c0_i64_2 : i64 | |
%58 = arith.select %57, %54, %21 : i64 | |
%59 = arith.cmpi slt, %27, %c0_i64_2 : i64 | |
%60 = arith.select %59, %54, %27 : i64 | |
%61 = arith.cmpi slt, %33, %c0_i64_2 : i64 | |
%62 = arith.select %61, %54, %33 : i64 | |
%63 = arith.cmpi slt, %39, %c0_i64_2 : i64 | |
%64 = arith.select %63, %54, %39 : i64 | |
%from_elements = tensor.from_elements %56, %58, %60, %62, %64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%65 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %65 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%c12800_i64 = arith.constant 12800 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c1 = arith.constant 1 : index | |
%c0_i64 = arith.constant 0 : i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%dim = tensor.dim %0, %c1 : tensor<4x?xi64> | |
%2 = arith.index_cast %dim : index to i64 | |
%3 = torch_c.from_i64 %2 | |
%4 = torch_c.to_i64 %3 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%16 = arith.select %15, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %16, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%17 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %17 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After ResolveShapedTypeResultDims (resolve-shaped-type-result-dims) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%c12800_i64 = arith.constant 12800 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c1 = arith.constant 1 : index | |
%c0_i64 = arith.constant 0 : i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%dim = tensor.dim %0, %c1 : tensor<4x?xi64> | |
%2 = arith.index_cast %dim : index to i64 | |
%3 = torch_c.from_i64 %2 | |
%4 = torch_c.to_i64 %3 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%16 = arith.select %15, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %16, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%17 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %17 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%c12800_i64 = arith.constant 12800 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c1 = arith.constant 1 : index | |
%c0_i64 = arith.constant 0 : i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%dim = tensor.dim %0, %c1 : tensor<4x?xi64> | |
%2 = arith.index_cast %dim : index to i64 | |
%3 = torch_c.from_i64 %2 | |
%4 = torch_c.to_i64 %3 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %16 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%c12800_i64 = arith.constant 12800 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c1 = arith.constant 1 : index | |
%c0_i64 = arith.constant 0 : i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%dim = tensor.dim %0, %c1 : tensor<4x?xi64> | |
%2 = arith.index_cast %dim : index to i64 | |
%3 = torch_c.from_i64 %2 | |
%4 = torch_c.to_i64 %3 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %16 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
// -----// IR Dump After Inliner (inline) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
ml_program.global private mutable @global_seed(dense<0> : tensor<i64>) : tensor<i64> | |
func.func @torch.prims.convert_element_type$fold(%arg0: !torch.vtensor<[4,?,32,100],f32>, %arg1: !torch.vtensor<[4,?],si64>) -> !torch.vtensor<[4,?,32,50,2],f32> attributes {torch.assume_strict_symbolic_shapes} { | |
%c12800_i64 = arith.constant 12800 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c1 = arith.constant 1 : index | |
%c0_i64 = arith.constant 0 : i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%0 = torch_c.to_builtin_tensor %arg1 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%1 = torch_c.to_builtin_tensor %arg0 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%dim = tensor.dim %0, %c1 : tensor<4x?xi64> | |
%2 = arith.index_cast %dim : index to i64 | |
%3 = torch_c.from_i64 %2 | |
%4 = torch_c.to_i64 %3 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
return %16 : !torch.vtensor<[4,?,32,50,2],f32> | |
} | |
} | |
// -----// IR Dump After FuncConversion (torch-iree-func-conversion) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
ml_program.global private mutable @global_seed(dense<0> : tensor<i64>) : tensor<i64> | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = torch_c.from_builtin_tensor %1 : tensor<4x?x32x100xf32> -> !torch.vtensor<[4,?,32,100],f32> | |
%3 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%4 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%3} | |
%5 = torch_c.from_builtin_tensor %4 : tensor<4x?xi64> -> !torch.vtensor<[4,?],si64> | |
%c12800_i64 = arith.constant 12800 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c1 = arith.constant 1 : index | |
%c0_i64 = arith.constant 0 : i64 | |
%c1_i64 = arith.constant 1 : i64 | |
%6 = torch_c.to_builtin_tensor %5 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%7 = torch_c.to_builtin_tensor %2 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%dim = tensor.dim %6, %c1 : tensor<4x?xi64> | |
%8 = arith.index_cast %dim : index to i64 | |
%9 = torch_c.from_i64 %8 | |
%10 = torch_c.to_i64 %9 | |
%11 = arith.muli %10, %c4_i64 : i64 | |
%12 = arith.cmpi slt, %10, %c0_i64 : i64 | |
%13 = arith.select %12, %c4_i64, %11 : i64 | |
%14 = arith.extui %12 : i1 to i64 | |
%15 = arith.addi %14, %c1_i64 : i64 | |
%16 = arith.muli %13, %c64_i64 : i64 | |
%17 = arith.cmpi sle, %15, %c1_i64 : i64 | |
cf.assert %17, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %7, %c1 : tensor<4x?x32x100xf32> | |
%18 = arith.index_cast %dim_0 : index to i64 | |
%19 = arith.muli %18, %c12800_i64 : i64 | |
%20 = arith.divsi %19, %16 : i64 | |
%21 = arith.select %12, %20, %10 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %21, %c32_i64, %20, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %7(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%22 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
%23 = torch_c.to_builtin_tensor %22 : !torch.vtensor<[4,?,32,50,2],f32> -> tensor<4x?x32x50x2xf32> | |
%24 = hal.tensor.barrier join(%23 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%c1_1 = arith.constant 1 : index | |
%dim_2 = tensor.dim %24, %c1_1 : tensor<4x?x32x50x2xf32> | |
%25 = hal.tensor.export %24 : tensor<4x?x32x50x2xf32>{%dim_2} -> !hal.buffer_view | |
util.return %25 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = torch_c.from_builtin_tensor %1 : tensor<4x?x32x100xf32> -> !torch.vtensor<[4,?,32,100],f32> | |
%3 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%4 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%3} | |
%5 = torch_c.from_builtin_tensor %4 : tensor<4x?xi64> -> !torch.vtensor<[4,?],si64> | |
%6 = torch_c.to_builtin_tensor %5 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%7 = torch_c.to_builtin_tensor %2 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%dim = tensor.dim %6, %c1 : tensor<4x?xi64> | |
%8 = arith.index_cast %dim : index to i64 | |
%9 = torch_c.from_i64 %8 | |
%10 = torch_c.to_i64 %9 | |
%11 = arith.muli %10, %c4_i64 : i64 | |
%12 = arith.cmpi slt, %10, %c0_i64 : i64 | |
%13 = arith.select %12, %c4_i64, %11 : i64 | |
%14 = arith.extui %12 : i1 to i64 | |
%15 = arith.addi %14, %c1_i64 : i64 | |
%16 = arith.muli %13, %c64_i64 : i64 | |
%17 = arith.cmpi sle, %15, %c1_i64 : i64 | |
cf.assert %17, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %7, %c1 : tensor<4x?x32x100xf32> | |
%18 = arith.index_cast %dim_0 : index to i64 | |
%19 = arith.muli %18, %c12800_i64 : i64 | |
%20 = arith.divsi %19, %16 : i64 | |
%21 = arith.select %12, %20, %10 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %21, %c32_i64, %20, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %7(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%22 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
%23 = torch_c.to_builtin_tensor %22 : !torch.vtensor<[4,?,32,50,2],f32> -> tensor<4x?x32x50x2xf32> | |
%24 = hal.tensor.barrier join(%23 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %24, %c1 : tensor<4x?x32x50x2xf32> | |
%25 = hal.tensor.export %24 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %25 : !hal.buffer_view | |
} | |
// -----// IR Dump After SymbolDCE (symbol-dce) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = torch_c.from_builtin_tensor %1 : tensor<4x?x32x100xf32> -> !torch.vtensor<[4,?,32,100],f32> | |
%3 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%4 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%3} | |
%5 = torch_c.from_builtin_tensor %4 : tensor<4x?xi64> -> !torch.vtensor<[4,?],si64> | |
%6 = torch_c.to_builtin_tensor %5 : !torch.vtensor<[4,?],si64> -> tensor<4x?xi64> | |
%7 = torch_c.to_builtin_tensor %2 : !torch.vtensor<[4,?,32,100],f32> -> tensor<4x?x32x100xf32> | |
%dim = tensor.dim %6, %c1 : tensor<4x?xi64> | |
%8 = arith.index_cast %dim : index to i64 | |
%9 = torch_c.from_i64 %8 | |
%10 = torch_c.to_i64 %9 | |
%11 = arith.muli %10, %c4_i64 : i64 | |
%12 = arith.cmpi slt, %10, %c0_i64 : i64 | |
%13 = arith.select %12, %c4_i64, %11 : i64 | |
%14 = arith.extui %12 : i1 to i64 | |
%15 = arith.addi %14, %c1_i64 : i64 | |
%16 = arith.muli %13, %c64_i64 : i64 | |
%17 = arith.cmpi sle, %15, %c1_i64 : i64 | |
cf.assert %17, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %7, %c1 : tensor<4x?x32x100xf32> | |
%18 = arith.index_cast %dim_0 : index to i64 | |
%19 = arith.muli %18, %c12800_i64 : i64 | |
%20 = arith.divsi %19, %16 : i64 | |
%21 = arith.select %12, %20, %10 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %21, %c32_i64, %20, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %7(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%22 = torch_c.from_builtin_tensor %reshape : tensor<4x?x32x50x2xf32> -> !torch.vtensor<[4,?,32,50,2],f32> | |
%23 = torch_c.to_builtin_tensor %22 : !torch.vtensor<[4,?,32,50,2],f32> -> tensor<4x?x32x50x2xf32> | |
%24 = hal.tensor.barrier join(%23 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %24, %c1 : tensor<4x?x32x50x2xf32> | |
%25 = hal.tensor.export %24 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %25 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FinalizingBackendTypeConversion (torch-finalizing-backend-type-conversion) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After FinalizingBackendTypeConversion (torch-finalizing-backend-type-conversion) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%2} | |
%dim = tensor.dim %3, %c1 : tensor<4x?xi64> | |
%4 = arith.index_cast %dim : index to i64 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %16, %c1 : tensor<4x?x32x50x2xf32> | |
%17 = hal.tensor.export %16 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %17 : !hal.buffer_view | |
} | |
// -----// IR Dump After AutoInputConversionPipeline (iree-auto-input-conversion) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%2} | |
%dim = tensor.dim %3, %c1 : tensor<4x?xi64> | |
%4 = arith.index_cast %dim : index to i64 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %16, %c1 : tensor<4x?x32x50x2xf32> | |
%17 = hal.tensor.export %16 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %17 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IREEImportPublic (iree-import-public) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%2} | |
%dim = tensor.dim %3, %c1 : tensor<4x?xi64> | |
%4 = arith.index_cast %dim : index to i64 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %16, %c1 : tensor<4x?x32x50x2xf32> | |
%17 = hal.tensor.export %16 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %17 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ImportMLProgram (iree-import-ml-program) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%2} | |
%dim = tensor.dim %3, %c1 : tensor<4x?xi64> | |
%4 = arith.index_cast %dim : index to i64 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %16, %c1 : tensor<4x?x32x50x2xf32> | |
%17 = hal.tensor.export %16 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %17 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SanitizeModuleNames (iree-sanitize-module-names) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%2} | |
%dim = tensor.dim %3, %c1 : tensor<4x?xi64> | |
%4 = arith.index_cast %dim : index to i64 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %16, %c1 : tensor<4x?x32x50x2xf32> | |
%17 = hal.tensor.export %16 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %17 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ConvertMeshToFlowPass (iree-convert-mesh-to-flow) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%2} | |
%dim = tensor.dim %3, %c1 : tensor<4x?xi64> | |
%4 = arith.index_cast %dim : index to i64 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %16, %c1 : tensor<4x?x32x50x2xf32> | |
%17 = hal.tensor.export %16 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %17 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After mlir::iree_compiler::IREE::ABI::ConvertStreamableOpsPass (iree-abi-convert-streamable-ops) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%2} | |
%dim = tensor.dim %3, %c1 : tensor<4x?xi64> | |
%4 = arith.index_cast %dim : index to i64 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %16, %c1 : tensor<4x?x32x50x2xf32> | |
%17 = hal.tensor.export %16 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %17 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After mlir::iree_compiler::IREE::ABI::WrapEntryPointsPass (iree-abi-wrap-entry-points) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = hal.tensor.import wait(%arg2) => %arg1 : !hal.buffer_view -> tensor<4x?xi64>{%2} | |
%dim = tensor.dim %3, %c1 : tensor<4x?xi64> | |
%4 = arith.index_cast %dim : index to i64 | |
%5 = arith.muli %4, %c4_i64 : i64 | |
%6 = arith.cmpi slt, %4, %c0_i64 : i64 | |
%7 = arith.select %6, %c4_i64, %5 : i64 | |
%8 = arith.extui %6 : i1 to i64 | |
%9 = arith.addi %8, %c1_i64 : i64 | |
%10 = arith.muli %7, %c64_i64 : i64 | |
%11 = arith.cmpi sle, %9, %c1_i64 : i64 | |
cf.assert %11, "must have at most one inferred (negative) dimension" | |
%dim_0 = tensor.dim %1, %c1 : tensor<4x?x32x100xf32> | |
%12 = arith.index_cast %dim_0 : index to i64 | |
%13 = arith.muli %12, %c12800_i64 : i64 | |
%14 = arith.divsi %13, %10 : i64 | |
%15 = arith.select %6, %14, %4 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %15, %c32_i64, %14, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim_1 = tensor.dim %16, %c1 : tensor<4x?x32x50x2xf32> | |
%17 = hal.tensor.export %16 : tensor<4x?x32x50x2xf32>{%dim_1} -> !hal.buffer_view | |
util.return %17 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Inliner (inline) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After SymbolDCE (symbol-dce) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After DemoteF64ToF32 (iree-util-demote-f64-to-f32) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After RemoveZeroExtentTensors (iree-global-opt-remove-zero-extent-tensors) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After RemoveZeroExtentTensors (iree-global-opt-remove-zero-extent-tensors) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After DetachElementwiseFromNamedOps (iree-global-opt-detach-elementwise-from-named-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After LinalgNamedOpConversionPass (linalg-named-op-conversion) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Convert1X1FilterConv2DToMatmul (iree-global-opt-convert-1x1-filter-conv2d-to-matmul) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After DetachElementwiseFromNamedOps (iree-global-opt-detach-elementwise-from-named-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After LinalgNamedOpConversionPass (linalg-named-op-conversion) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Convert1X1FilterConv2DToMatmul (iree-global-opt-convert-1x1-filter-conv2d-to-matmul) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After EraseUnusedLinalgOperands (iree-global-opt-erase-unused-linalg-operands) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ExpandTensorShapes (iree-global-opt-expand-tensor-shapes) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ConvertElementwiseToLinalgPass (convert-elementwise-to-linalg) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ConvertElementwiseToLinalgPass (convert-elementwise-to-linalg) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After RaiseSpecialOps (iree-global-opt-raise-special-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After RaiseSpecialOps (iree-global-opt-raise-special-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After DecomposeConcat (iree-global-opt-decompose-concat) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After GeneralizeLinalgNamedOps (iree-global-opt-generalize-linalg-named-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After DecomposeConcat (iree-global-opt-decompose-concat) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After GeneralizeLinalgNamedOps (iree-global-opt-generalize-linalg-named-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After FoldUnitExtentDimsPass (iree-flow-fold-unit-extent-dims) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After FuseDequantizationMatmul (iree-global-opt-fuse-dequantization-matmul) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After FoldUnitExtentDimsPass (iree-flow-fold-unit-extent-dims) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After FuseDequantizationMatmul (iree-global-opt-fuse-dequantization-matmul) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After SetEncoding (iree-global-opt-set-encoding) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CPUMaterializeUpperBoundTileSize (iree-codegen-cpu-materialize-upper-bound-tile-size) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CPUMaterializeUpperBoundTileSize (iree-codegen-cpu-materialize-upper-bound-tile-size) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CPUMaterializeEncoding (iree-codegen-cpu-materialize-encoding) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CPUMaterializeEncoding (iree-codegen-cpu-materialize-encoding) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After MaterializeHomogeneousEncodings (iree-global-opt-materialize-homogeneous-encodings) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SimplifyPackUnpack (iree-global-opt-simplify-pack-unpack) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After DataLayoutPropagation (iree-global-opt-data-layout-propagation) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After GeneralizeLinalgNamedOps (iree-global-opt-generalize-linalg-named-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After GlobalLoopInvariantCodeMotion (iree-global-opt-loop-invariant-code-motion) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After DataLayoutPropagation (iree-global-opt-data-layout-propagation) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After GeneralizeLinalgNamedOps (iree-global-opt-generalize-linalg-named-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After GlobalLoopInvariantCodeMotion (iree-global-opt-loop-invariant-code-motion) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After HoistIntoGlobals (iree-util-hoist-into-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After JitGlobals (iree-consteval-jit-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After RaiseSpecialOps (iree-global-opt-raise-special-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After RaiseSpecialOps (iree-global-opt-raise-special-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After VerifyInputLegalityPass (iree-verify-input-legality) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After InjectTensorTracingPass (iree-flow-inject-tensor-tracing) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After InjectTensorTracingPass (iree-flow-inject-tensor-tracing) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After TensorPadToTensorInsertSlicePass (iree-flow-tensor-pad-to-tensor-insert-slice) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FixedPointIterator (iree-util-fixed-point-iterator) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FusionPreprocessingPass (iree-flow-fusion-preprocessing) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After FusionPreprocessingPass (iree-flow-fusion-preprocessing) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ElementwiseOpFusionPass (iree-flow-elementwise-op-fusion) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ElementwiseOpFusionPass (iree-flow-elementwise-op-fusion) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After BubbleUpExpandShapesPass (iree-flow-bubble-up-expand-shapes) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ElementwiseOpFusionPass (iree-flow-elementwise-op-fusion) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After BubbleUpExpandShapesPass (iree-flow-bubble-up-expand-shapes) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SinkReshapesPass (iree-flow-sink-reshapes) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After FusionOfTensorOpsPass (iree-flow-fusion-of-tensor-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ElementwiseOpFusionPass (iree-flow-elementwise-op-fusion) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SplitReductionPass (iree-flow-split-reduction-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After FusionPreprocessingPass (iree-flow-fusion-preprocessing) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After InterchangeTransposeGenericOpsPass (iree-flow-interchange-transpose-generic-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After FormScalarDispatchesPass (iree-flow-form-scalar-dispatches) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After FormDispatchRegionsPass (iree-flow-form-dispatch-regions) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CloneProducersIntoDispatchRegionsPass (iree-flow-clone-producers-into-dispatch-regions) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CollapseDimensionsPass (iree-flow-collapse-dimensions) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After FormDispatchWorkgroupsPass (iree-flow-form-dispatch-workgroups) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CaptureDynamicDimsPass (iree-flow-capture-dynamic-dims) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SinkReshapesPass (iree-flow-sink-reshapes) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After FusionOfTensorOpsPass (iree-flow-fusion-of-tensor-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After InitializeEmptyTensorsPass (iree-flow-initialize-empty-tensors) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After SplitReductionPass (iree-flow-split-reduction-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After FusionPreprocessingPass (iree-flow-fusion-preprocessing) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After InterchangeTransposeGenericOpsPass (iree-flow-interchange-transpose-generic-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After FormScalarDispatchesPass (iree-flow-form-scalar-dispatches) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After FormDispatchRegionsPass (iree-flow-form-dispatch-regions) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CloneProducersIntoDispatchRegionsPass (iree-flow-clone-producers-into-dispatch-regions) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After CollapseDimensionsPass (iree-flow-collapse-dimensions) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c1 = arith.constant 1 : index | |
%c4_i64 = arith.constant 4 : i64 | |
%c32_i64 = arith.constant 32 : i64 | |
%c2_i64 = arith.constant 2 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%from_elements = tensor.from_elements %c4_i64, %14, %c32_i64, %13, %c2_i64 : tensor<5xi64> | |
%reshape = tensor.reshape %1(%from_elements) : (tensor<4x?x32x100xf32>, tensor<5xi64>) -> tensor<4x?x32x50x2xf32> | |
%15 = hal.tensor.barrier join(%reshape : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%dim = tensor.dim %15, %c1 : tensor<4x?x32x50x2xf32> | |
%16 = hal.tensor.export %15 : tensor<4x?x32x50x2xf32>{%dim} -> !hal.buffer_view | |
util.return %16 : !hal.buffer_view | |
} | |
// -----// IR Dump After FormDispatchWorkgroupsPass (iree-flow-form-dispatch-workgroups) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After CaptureDynamicDimsPass (iree-flow-capture-dynamic-dims) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After InitializeEmptyTensorsPass (iree-flow-initialize-empty-tensors) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After OutlineDispatchExternsPass (iree-flow-outline-dispatch-externs) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After OutlineDispatchRegionsPass (iree-flow-outline-dispatch-regions) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After AnnotateDispatchesPass (iree-flow-annotate-dispatches) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After DeduplicateExecutablesPass (iree-flow-deduplicate-executables) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After InjectTensorTracingPass (iree-flow-inject-tensor-tracing) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CleanupTensorShapesPass (iree-flow-cleanup-tensor-shapes) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After InjectTensorTracingPass (iree-flow-inject-tensor-tracing) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After CleanupTensorShapesPass (iree-flow-cleanup-tensor-shapes) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After OutlineConstantsPass (iree-flow-outline-constants) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FixedPointIterator (iree-util-fixed-point-iterator) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SymbolDCE (symbol-dce) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After VerifyInputPass (iree-stream-verify-input) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%1 = hal.tensor.import wait(%arg2) => %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = flow.tensor.reshape %1 : tensor<4x?x32x100xf32>{%0} -> tensor<4x?x32x50x2xf32>{%15} | |
%17 = hal.tensor.barrier join(%16 : tensor<4x?x32x50x2xf32>) => %arg3 : !hal.fence | |
%18 = hal.tensor.export %17 : tensor<4x?x32x50x2xf32>{%15} -> !hal.buffer_view | |
util.return %18 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ConvertToStreamPass (iree-stream-conversion) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
%c4 = arith.constant 4 : index | |
%c32 = arith.constant 32 : index | |
%c100 = arith.constant 100 : index | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%21 = stream.tensor.clone %5 : tensor<4x?x32x100xf32>{%0} in !stream.resource<*>{%1} -> tensor<4x?x32x50x2xf32>{%19} in !stream.resource<*>{%20} | |
%result, %result_timepoint = stream.timepoint.barrier %21 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%22 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%23 = stream.tensor.export %22 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %23 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After VerifyLoweringToTensorsPass (iree-stream-verify-lowering-to-tensors) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
%c4 = arith.constant 4 : index | |
%c32 = arith.constant 32 : index | |
%c100 = arith.constant 100 : index | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%21 = stream.tensor.clone %5 : tensor<4x?x32x100xf32>{%0} in !stream.resource<*>{%1} -> tensor<4x?x32x50x2xf32>{%19} in !stream.resource<*>{%20} | |
%result, %result_timepoint = stream.timepoint.barrier %21 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%22 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%23 = stream.tensor.export %22 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %23 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CombineInitializers (iree-util-combine-initializers) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = stream.tensor.sizeof tensor<4x?x32x100xf32>{%0} : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = stream.tensor.sizeof tensor<4x?x32x50x2xf32>{%19} : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After EncodeHostTensorsPass (iree-stream-encode-host-tensors) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After EncodeHostTensorsPass (iree-stream-encode-host-tensors) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After VerifyLoweringToAsyncResourcesPass (iree-stream-verify-lowering-to-async-resources) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After MaterializeCopyOnWritePass (iree-stream-materialize-copy-on-write) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After MaterializeCopyOnWritePass (iree-stream-materialize-copy-on-write) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After ElideAsyncCopiesPass (iree-stream-elide-async-copies) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After EmplaceAllocationsPass (iree-stream-emplace-allocations) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After EmplaceAllocationsPass (iree-stream-emplace-allocations) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = stream.async.transfer %4 : !stream.resource<external>{%1} -> !stream.resource<*>{%1} | |
%6 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%7 = arith.index_cast %6 : index to i64 | |
%8 = arith.muli %7, %c4_i64 : i64 | |
%9 = arith.cmpi slt, %7, %c0_i64 : i64 | |
%10 = arith.select %9, %c4_i64, %8 : i64 | |
%11 = arith.extui %9 : i1 to i64 | |
%12 = arith.addi %11, %c1_i64 : i64 | |
%13 = arith.muli %10, %c64_i64 : i64 | |
%14 = arith.cmpi sle, %12, %c1_i64 : i64 | |
cf.assert %14, "must have at most one inferred (negative) dimension" | |
%15 = arith.index_cast %0 : index to i64 | |
%16 = arith.muli %15, %c12800_i64 : i64 | |
%17 = arith.divsi %16, %13 : i64 | |
%18 = arith.select %9, %17, %7 : i64 | |
%19 = arith.index_cast %18 : i64 to index | |
%20 = arith.muli %19, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %5 : !stream.resource<*>{%20} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%21 = stream.async.transfer %result : !stream.resource<*>{%20} -> !stream.resource<external>{%20} | |
%22 = stream.tensor.export %21 : tensor<4x?x32x50x2xf32>{%19} in !stream.resource<external>{%20} -> !hal.buffer_view | |
util.return %22 : !hal.buffer_view | |
} | |
// -----// IR Dump After RefineUsagePass (iree-stream-refine-usage) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = stream.timepoint.await %3 => %2 : !stream.resource<external>{%1} | |
%5 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%6 = arith.index_cast %5 : index to i64 | |
%7 = arith.muli %6, %c4_i64 : i64 | |
%8 = arith.cmpi slt, %6, %c0_i64 : i64 | |
%9 = arith.select %8, %c4_i64, %7 : i64 | |
%10 = arith.extui %8 : i1 to i64 | |
%11 = arith.addi %10, %c1_i64 : i64 | |
%12 = arith.muli %9, %c64_i64 : i64 | |
%13 = arith.cmpi sle, %11, %c1_i64 : i64 | |
cf.assert %13, "must have at most one inferred (negative) dimension" | |
%14 = arith.index_cast %0 : index to i64 | |
%15 = arith.muli %14, %c12800_i64 : i64 | |
%16 = arith.divsi %15, %12 : i64 | |
%17 = arith.select %8, %16, %6 : i64 | |
%18 = arith.index_cast %17 : i64 to index | |
%19 = arith.muli %18, %c51200 : index | |
%result, %result_timepoint = stream.timepoint.barrier %4 : !stream.resource<external>{%19} => !stream.timepoint | |
stream.timepoint.chain_external %result_timepoint => (%arg3 : !hal.fence) | |
%20 = stream.tensor.export %result : tensor<4x?x32x50x2xf32>{%18} in !stream.resource<external>{%19} -> !hal.buffer_view | |
util.return %20 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After VerifyAsyncAccessRangesPass (iree-stream-verify-async-access-ranges) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ScheduleExecutionPass (iree-stream-schedule-execution) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ScheduleConcurrencyPass (iree-stream-schedule-concurrency) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ScheduleExecutionPass (iree-stream-schedule-execution) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After ScheduleConcurrencyPass (iree-stream-schedule-concurrency) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After PropagateTimepointsPass (iree-stream-propagate-timepoints) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After MaterializeBuiltinsPass (iree-stream-materialize-builtins) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After VerifyLoweringToAsyncPass (iree-stream-verify-lowering-to-async) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ScheduleAllocationPass (iree-stream-schedule-allocation) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After PackConstantsPass (iree-stream-pack-constants) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After LayoutSlicesPass (iree-stream-layout-slices) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After PackConstantsPass (iree-stream-pack-constants) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After LayoutSlicesPass (iree-stream-layout-slices) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After PropagateSubranges (iree-util-propagate-subranges) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After VerifyLoweringToCmdPass (iree-stream-verify-lowering-to-cmd) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SCFToControlFlow (convert-scf-to-cf) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SCFToControlFlow (convert-scf-to-cf) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ElideTimepointsPass (iree-stream-elide-timepoints) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FixedPointIterator (iree-util-fixed-point-iterator) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseDispatchBindingsPass (iree-stream-fuse-dispatch-bindings) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After AnnotateDispatchArgumentsPass (iree-stream-annotate-dispatch-arguments) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After PackDispatchOperandsPass (iree-stream-pack-dispatch-operands) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldUniformOperandsPass (iree-stream-fold-uniform-operands) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SymbolDCE (symbol-dce) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After AssignTargetDevicesPass (iree-hal-assign-target-devices) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After VerifyTargetEnvironmentPass (iree-hal-verify-target-environment) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After MaterializeInterfacesPass (iree-hal-materialize-interfaces) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After PruneExecutablesPass (iree-hal-prune-executables) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CPUMaterializeUpperBoundTileSize (iree-codegen-cpu-materialize-upper-bound-tile-size) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CPUMaterializeUpperBoundTileSize (iree-codegen-cpu-materialize-upper-bound-tile-size) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%2 = stream.tensor.import %arg0 : !hal.buffer_view -> tensor<4x?x32x100xf32>{%0} in !stream.resource<external>{%1} | |
%3 = stream.timepoint.import %arg2 : (!hal.fence) => !stream.timepoint | |
%4 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%5 = arith.index_cast %4 : index to i64 | |
%6 = arith.muli %5, %c4_i64 : i64 | |
%7 = arith.cmpi slt, %5, %c0_i64 : i64 | |
%8 = arith.select %7, %c4_i64, %6 : i64 | |
%9 = arith.extui %7 : i1 to i64 | |
%10 = arith.addi %9, %c1_i64 : i64 | |
%11 = arith.muli %8, %c64_i64 : i64 | |
%12 = arith.cmpi sle, %10, %c1_i64 : i64 | |
cf.assert %12, "must have at most one inferred (negative) dimension" | |
%13 = arith.index_cast %0 : index to i64 | |
%14 = arith.muli %13, %c12800_i64 : i64 | |
%15 = arith.divsi %14, %11 : i64 | |
%16 = arith.select %7, %15, %5 : i64 | |
%17 = arith.index_cast %16 : i64 to index | |
%18 = arith.muli %17, %c51200 : index | |
stream.timepoint.chain_external %3 => (%arg3 : !hal.fence) | |
%19 = stream.tensor.export %2 : tensor<4x?x32x50x2xf32>{%17} in !stream.resource<external>{%18} -> !hal.buffer_view | |
util.return %19 : !hal.buffer_view | |
} | |
// -----// IR Dump After ConvertToHALPass (iree-hal-conversion) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
%c0_0 = arith.constant 0 : index | |
%device_0_1 = hal.devices.get %c0_0 : !hal.device | |
%c-1_i64 = arith.constant -1 : i64 | |
hal.device.queue.execute<%device_0_1 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%dense_row_major_2 = hal.encoding_type<dense_row_major> : i32 | |
%element_type_f32_3 = hal.element_type<f32> : i32 | |
%c4_4 = arith.constant 4 : index | |
%c32_5 = arith.constant 32 : index | |
%c50 = arith.constant 50 : index | |
%c2 = arith.constant 2 : index | |
%c0_6 = arith.constant 0 : index | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0_6, %16] shape([%c4_4, %15, %c32_5, %c50, %c2]) type(%element_type_f32_3) encoding(%dense_row_major_2) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FixupLegacySyncPass (iree-hal-fixup-legacy-sync) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
%c0_0 = arith.constant 0 : index | |
%device_0_1 = hal.devices.get %c0_0 : !hal.device | |
%c-1_i64 = arith.constant -1 : i64 | |
hal.device.queue.execute<%device_0_1 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%dense_row_major_2 = hal.encoding_type<dense_row_major> : i32 | |
%element_type_f32_3 = hal.element_type<f32> : i32 | |
%c4_4 = arith.constant 4 : index | |
%c32_5 = arith.constant 32 : index | |
%c50 = arith.constant 50 : index | |
%c2 = arith.constant 2 : index | |
%c0_6 = arith.constant 0 : index | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0_6, %16] shape([%c4_4, %15, %c32_5, %c50, %c2]) type(%element_type_f32_3) encoding(%dense_row_major_2) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After PruneExecutablesPass (iree-hal-prune-executables) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
%c0_0 = arith.constant 0 : index | |
%device_0_1 = hal.devices.get %c0_0 : !hal.device | |
%c-1_i64 = arith.constant -1 : i64 | |
hal.device.queue.execute<%device_0_1 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%dense_row_major_2 = hal.encoding_type<dense_row_major> : i32 | |
%element_type_f32_3 = hal.element_type<f32> : i32 | |
%c4_4 = arith.constant 4 : index | |
%c32_5 = arith.constant 32 : index | |
%c50 = arith.constant 50 : index | |
%c2 = arith.constant 2 : index | |
%c0_6 = arith.constant 0 : index | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0_6, %16] shape([%c4_4, %15, %c32_5, %c50, %c2]) type(%element_type_f32_3) encoding(%dense_row_major_2) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%c50 = arith.constant 50 : index | |
%c2 = arith.constant 2 : index | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SymbolDCE (symbol-dce) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After LinkExecutablesPass (iree-hal-link-executables) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ResolveExportOrdinalsPass (iree-hal-resolve-export-ordinals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After MaterializeResourceCachesPass (iree-hal-materialize-resource-caches) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After MemoizeDeviceQueriesPass (iree-hal-memoize-device-queries) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ElideRedundantCommandsPass (iree-hal-elide-redundant-commands) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After ElideRedundantCommandsPass (iree-hal-elide-redundant-commands) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After AffineExpandIndexOps (affine-expand-index-ops) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After ConvertAffineToStandard (lower-affine) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SCFToControlFlow (convert-scf-to-cf) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After SCFToControlFlow (convert-scf-to-cf) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After CombineInitializers (iree-util-combine-initializers) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After PruneExecutablesPass (iree-hal-prune-executables) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SymbolDCE (symbol-dce) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ApplyPatterns (iree-util-apply-patterns) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FoldGlobals (iree-util-fold-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FuseGlobals (iree-util-fuse-globals) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After IPO (iree-util-ipo) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local], iree.fixedpoint.iteration = 0 : index} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After FixedPointIterator (iree-util-fixed-point-iterator) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After Inliner (inline) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SymbolDCE (symbol-dce) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SCFForLoopCanonicalization (scf-for-loop-canonicalization) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SCFForLoopCanonicalization (scf-for-loop-canonicalization) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After LoopInvariantCodeMotion (loop-invariant-code-motion) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After SCFToControlFlow (convert-scf-to-cf) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After LoopInvariantCodeMotion (loop-invariant-code-motion) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SCFToControlFlow (convert-scf-to-cf) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After AffineExpandIndexOps (affine-expand-index-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ConvertAffineToStandard (lower-affine) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After ArithUnsignedWhenEquivalent (arith-unsigned-when-equivalent) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After AffineExpandIndexOps (affine-expand-index-ops) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After ConvertAffineToStandard (lower-affine) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After ArithUnsignedWhenEquivalent (arith-unsigned-when-equivalent) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
// -----// IR Dump After PropagateSubranges (iree-util-propagate-subranges) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After Canonicalizer (canonicalize) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After CSE (cse) //----- // | |
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "", data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128", native_vector_size = 16 : i64, target_triple = "x86_64-unknown-unknown-eabi-elf"}> | |
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_x86_64_]> | |
module attributes {hal.device.targets = [#device_target_local]} { | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arith.cmpi slt, %3, %c0_i64 : i64 | |
%6 = arith.select %5, %c4_i64, %4 : i64 | |
%7 = arith.extui %5 : i1 to i64 | |
%8 = arith.addi %7, %c1_i64 : i64 | |
%9 = arith.muli %6, %c64_i64 : i64 | |
%10 = arith.cmpi sle, %8, %c1_i64 : i64 | |
cf.assert %10, "must have at most one inferred (negative) dimension" | |
%11 = arith.index_cast %0 : index to i64 | |
%12 = arith.muli %11, %c12800_i64 : i64 | |
%13 = arith.divsi %12, %9 : i64 | |
%14 = arith.select %5, %13, %3 : i64 | |
%15 = arith.index_cast %14 : i64 to index | |
%16 = arith.muli %15, %c51200 : index | |
hal.device.queue.execute<%device_0 : !hal.device> affinity(%c-1_i64) wait(%arg2) signal(%arg3) | |
%view = hal.buffer_view.create buffer(%buffer : !hal.buffer)[%c0, %16] shape([%c4, %15, %c32, %c50, %c2]) type(%element_type_f32) encoding(%dense_row_major) : !hal.buffer_view | |
util.return %view : !hal.buffer_view | |
} | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view) -> !hal.buffer_view attributes {iree.abi.stub} { | |
%c-1_i32 = arith.constant -1 : i32 | |
%c0 = arith.constant 0 : index | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%0 = util.null : !hal.fence | |
%fence = hal.fence.create device(%device_0 : !hal.device) flags("None") : !hal.fence | |
%1 = util.call @torch.prims.convert_element_type$fold$async(%arg0, %arg1, %0, %fence) : (!hal.buffer_view, !hal.buffer_view, !hal.fence, !hal.fence) -> !hal.buffer_view | |
%status = hal.fence.await until([%fence]) timeout_millis(%c-1_i32) : i32 | |
util.return %1 : !hal.buffer_view | |
} | |
// -----// IR Dump After SimplifyGlobalAccesses (iree-util-simplify-global-accesses) //----- // | |
util.func public @torch.prims.convert_element_type$fold$async(%arg0: !hal.buffer_view, %arg1: !hal.buffer_view, %arg2: !hal.fence, %arg3: !hal.fence) -> !hal.buffer_view attributes {inlining_policy = #util.inline.never, iree.abi.model = "coarse-fences", iree.abi.stub} { | |
%c2 = arith.constant 2 : index | |
%c50 = arith.constant 50 : index | |
%c-1_i64 = arith.constant -1 : i64 | |
%c0 = arith.constant 0 : index | |
%c51200 = arith.constant 51200 : index | |
%c100 = arith.constant 100 : index | |
%c32 = arith.constant 32 : index | |
%c4 = arith.constant 4 : index | |
%c1_i64 = arith.constant 1 : i64 | |
%c0_i64 = arith.constant 0 : i64 | |
%c4_i64 = arith.constant 4 : i64 | |
%c64_i64 = arith.constant 64 : i64 | |
%c12800_i64 = arith.constant 12800 : i64 | |
%0 = hal.buffer_view.dim<%arg0 : !hal.buffer_view>[1] : index | |
%element_type_f32 = hal.element_type<f32> : i32 | |
%dense_row_major = hal.encoding_type<dense_row_major> : i32 | |
hal.buffer_view.assert<%arg0 : !hal.buffer_view> message("tensor") shape([%c4, %0, %c32, %c100]) type(%element_type_f32) encoding(%dense_row_major) | |
%1 = arith.muli %0, %c51200 : index | |
%buffer = hal.buffer_view.buffer<%arg0 : !hal.buffer_view> : !hal.buffer | |
%device_0 = hal.devices.get %c0 : !hal.device | |
%allocator = hal.device.allocator<%device_0 : !hal.device> : !hal.allocator | |
hal.buffer.assert<%buffer : !hal.buffer> message("tensor") allocator(%allocator : !hal.allocator) minimum_length(%1) type(DeviceVisible) usage("TransferSource|TransferTarget|Transfer|DispatchStorageRead|DispatchStorageWrite|DispatchStorage") | |
%2 = hal.buffer_view.dim<%arg1 : !hal.buffer_view>[1] : index | |
%3 = arith.index_cast %2 : index to i64 | |
%4 = arith.muli %3, %c4_i64 : i64 | |
%5 = arit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment