Skip to content

Instantly share code, notes, and snippets.

View pashu123's full-sized avatar
๐Ÿ˜‡
Working from home

Prashant Kumar pashu123

๐Ÿ˜‡
Working from home
View GitHub Profile
func.func @prefill_bs4$async_dispatch_20_pack_f16() attributes {translation_info = #iree_codegen.translation_info<CPUDataTiling>} {
%c32_i64 = arith.constant 32 : i64
%cst = arith.constant 0.000000e+00 : f16
%0 = hal.interface.constant.load layout(<constants = 8, bindings = [#hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, Indirect>], flags = Indirect>) ordinal(0) : i32
%1 = hal.interface.constant.load layout(<constants = 8, bindings = [#hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, Indirect>], flags = Indirect>) ordinal(1) : i32
%2 = hal.interface.constant.load layout(<constants = 8, bindings = [#hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buffer, Indirect>], flags = Indirect>) ordinal(2) : i32
%3 = hal.interface.constant.load layout(<constants = 8, bindings = [#hal.pipeline.binding<storage_buffer, "ReadOnly|Indirect">, #hal.pipeline.binding<storage_buff
This file has been truncated, but you can view the full file.
// -----// IR Dump After AutoInputConversionPipelinePass (iree-auto-input-conversion) ('builtin.module' operation) //----- //
module {
util.func public @matmul(%arg0: tensor<64x64xf32>, %arg1: tensor<64x64xf32>) -> tensor<64x64xf32> {
%cst = arith.constant 0.000000e+00 : f32
%0 = tensor.empty() : tensor<64x64xf32>
%1 = linalg.fill ins(%cst : f32) outs(%0 : tensor<64x64xf32>) -> tensor<64x64xf32>
%2 = linalg.matmul ins(%arg0, %arg1 : tensor<64x64xf32>, tensor<64x64xf32>) outs(%1 : tensor<64x64xf32>) -> tensor<64x64xf32>
util.return %2 : tensor<64x64xf32>
}
}
This file has been truncated, but you can view the full file.
// -----// IR Dump After CheckVHLOStableHloMixUsage (iree-check-vhlostablehlo-mix-usage) ('builtin.module' operation) //----- //
module {
func.func @compare_i64() {
%0 = util.unfoldable_constant dense<1> : tensor<i64>
%1 = util.unfoldable_constant dense<5> : tensor<i64>
%2 = stablehlo.compare EQ, %0, %1 : (tensor<i64>, tensor<i64>) -> tensor<i1>
%3 = util.unfoldable_constant dense<0> : tensor<i8>
%4 = util.unfoldable_constant dense<1> : tensor<i8>
%5 = stablehlo.select %2, %4, %3 : tensor<i1>, tensor<i8>
check.expect_eq_const(%5, dense<0> : tensor<i8>) : tensor<i8>
This file has been truncated, but you can view the full file.
// -----// IR Dump After AutoInputConversionPipelinePass (iree-auto-input-conversion) //----- //
module {
util.func public @matmul(%arg0: tensor<64x64xf32>, %arg1: tensor<64x64xf32>) -> tensor<64x64xf32> {
%cst = arith.constant 0.000000e+00 : f32
%0 = tensor.empty() : tensor<64x64xf32>
%1 = linalg.fill ins(%cst : f32) outs(%0 : tensor<64x64xf32>) -> tensor<64x64xf32>
%2 = linalg.matmul ins(%arg0, %arg1 : tensor<64x64xf32>, tensor<64x64xf32>) outs(%1 : tensor<64x64xf32>) -> tensor<64x64xf32>
util.return %2 : tensor<64x64xf32>
}
}
This file has been truncated, but you can view the full file.
// -----// IR Dump After CheckVHLOStableHloMixUsage (iree-check-vhlostablehlo-mix-usage) //----- //
module {
func.func @compare_i64() {
%0 = util.unfoldable_constant dense<1> : tensor<i64>
%1 = util.unfoldable_constant dense<5> : tensor<i64>
%2 = stablehlo.compare EQ, %0, %1 : (tensor<i64>, tensor<i64>) -> tensor<i1>
%3 = util.unfoldable_constant dense<0> : tensor<i8>
%4 = util.unfoldable_constant dense<1> : tensor<i8>
%5 = stablehlo.select %2, %4, %3 : tensor<i1>, tensor<i8>
check.expect_eq_const(%5, dense<0> : tensor<i8>) : tensor<i8>
concat.mlir:0:0: error: failed to legalize operation 'util.initializer' that was explicitly marked illegal
concat.mlir:0:0: note: see current operation:
"util.initializer"() <{function_type = () -> ()}> ({
%0 = "arith.constant"() <{value = 1 : i8}> : () -> i8
%1 = "arith.constant"() <{value = 0 : i8}> : () -> i8
%2 = "arith.constant"() <{value = 8 : index}> : () -> index
%3 = "arith.constant"() <{value = 1 : i32}> : () -> i32
%4 = "arith.constant"() <{value = -1 : i64}> : () -> i64
%5 = "util.null"() : () -> !hal.executable
%6 = "arith.constant"() <{value = 14 : i32}> : () -> i32
This file has been truncated, but you can view the full file.
// -----// IR Dump After AutoInputConversionPipelinePass (iree-auto-input-conversion) //----- //
#executable_target_embedded_elf_arm_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-arm_64", {data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", native_vector_size = 16 : index, target_triple = "aarch64-none-elf"}>
#executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {data_layout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", native_vector_size = 32 : index, target_triple = "x86_64-none-elf"}>
#map = affine_map<()[s0] -> (s0 ceildiv 64)>
#map1 = affine_map<()[s0] -> (s0 * 64)>
#device_target_local = #hal.device.target<"local", [#executable_target_embedded_elf_arm_64_, #executable_target_embedded_elf_x86_64_]> : !hal.device
module @example attributes {hal.device.targets = [#device_target_local]} {
stream.executable private @executable attributes {hal.executable.objects = #hal.executable.objects<
module {
func.func @simple_test_with_cfg(%arg0: i8) -> tensor<2x4xf32> {
%0 = flow.dispatch.region -> (tensor<2x4xf32>) {
%c0_i8 = arith.constant 0 : i8
%1 = arith.cmpi eq, %arg0, %c0_i8 : i8
cf.cond_br %1, ^bb1, ^bb2
^bb1: // pred: ^bb0
%2 = tensor.empty() : tensor<2x4xf32>
flow.return %2 : tensor<2x4xf32>
^bb2: // pred: ^bb0
latest.mlir:3:10: error: 'func.func' op unhandled function with multiple blocks
%0 = flow.dispatch.region -> (tensor<2x4xf32>) {
^
latest.mlir:2:3: note: called from
func.func @simple_test_with_cfg(%arg0: i8) -> tensor<2x4xf32> {
^
latest.mlir:3:10: note: see current operation:
"func.func"() <{function_type = () -> (), sym_name = "simple_test_with_cfg_dispatch_0"}> ({
%0 = "arith.constant"() <{value = 0 : index}> : () -> index
%1 = "arith.constant"() <{value = 0 : i8}> : () -> i8
This file has been truncated, but you can view the full file.
// -----// IR Dump After AutoInputConversionPipelinePass (iree-auto-input-conversion) //----- //
module {
util.func public @matmul(%arg0: tensor<64x64xf32>, %arg1: tensor<64x64xf32>) -> tensor<64x64xf32> {
%cst = arith.constant 0.000000e+00 : f32
%0 = tensor.empty() : tensor<64x64xf32>
%1 = linalg.fill ins(%cst : f32) outs(%0 : tensor<64x64xf32>) -> tensor<64x64xf32>
%2 = linalg.matmul ins(%arg0, %arg1 : tensor<64x64xf32>, tensor<64x64xf32>) outs(%1 : tensor<64x64xf32>) -> tensor<64x64xf32>
util.return %2 : tensor<64x64xf32>
}
}