|
1 | 1 | // RUN: iree-opt --pass-pipeline='builtin.module(iree-llvmcpu-select-lowering-strategy, func.func(iree-llvmcpu-lower-executable-target))' --split-input-file %s | FileCheck %s |
2 | 2 |
|
3 | | -#pipeline_layout = #hal.pipeline.layout<constants = 5, bindings = [ |
| 3 | +#pipeline_layout = #hal.pipeline.layout<bindings = [ |
4 | 4 | #hal.pipeline.binding<storage_buffer>, |
5 | 5 | #hal.pipeline.binding<storage_buffer>, |
6 | 6 | #hal.pipeline.binding<storage_buffer> |
7 | 7 | ]> |
8 | 8 | #executable_target_embedded_elf_x86_64_ = #hal.executable.target<"llvm-cpu", "embedded-elf-x86_64", {cpu = "generic", cpu_features = "+avx512f", 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"}> |
9 | 9 | func.func @pad_conv_2d_nchw_fchw_1x320x64x64x320x3x3() attributes {hal.executable.target = #executable_target_embedded_elf_x86_64_} { |
10 | 10 | %cst = arith.constant 0.000000e+00 : f32 |
11 | | - %c1 = arith.constant 1 : index |
12 | 11 | %c0 = arith.constant 0 : index |
13 | | - %c5243520 = arith.constant 5243520 : index |
14 | | - %0 = hal.interface.constant.load layout(#pipeline_layout) ordinal(0) : i32 |
15 | | - %1 = hal.interface.constant.load layout(#pipeline_layout) ordinal(1) : i32 |
16 | | - %2 = hal.interface.constant.load layout(#pipeline_layout) ordinal(2) : i32 |
17 | | - %3 = hal.interface.constant.load layout(#pipeline_layout) ordinal(3) : i32 |
18 | | - %4 = hal.interface.constant.load layout(#pipeline_layout) ordinal(4) : i32 |
19 | | - %5 = arith.index_castui %0 {stream.alignment = 128 : index, stream.values = [10486400 : index, 15729280 : index]} : i32 to index |
20 | | - %6 = arith.index_castui %1 {stream.alignment = 256 : index, stream.values = [1273222400 : index, 1280618240 : index]} : i32 to index |
21 | | - %7 = arith.index_castui %2 {stream.alignment = 256 : index, stream.values = [10507520 : index, 21488640 : index]} : i32 to index |
22 | | - %8 = arith.index_castui %3 {stream.alignment = 256 : index, stream.values = [10508800 : index, 21489920 : index]} : i32 to index |
23 | | - %9 = arith.index_castui %4 {stream.alignment = 128 : index, stream.values = [10486400 : index, 10487680 : index]} : i32 to index |
24 | | - %10 = hal.interface.binding.subspan layout(#pipeline_layout) binding(0) alignment(64) offset(%c5243520) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320x64x64xf32>> |
25 | | - %11 = hal.interface.binding.subspan layout(#pipeline_layout) binding(1) alignment(64) offset(%6) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<320x320x3x3xf32>> |
26 | | - %12 = hal.interface.binding.subspan layout(#pipeline_layout) binding(1) alignment(64) offset(%7) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320xf32>> |
27 | | - %13 = hal.interface.binding.subspan layout(#pipeline_layout) binding(1) alignment(64) offset(%8) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320xf32>> |
28 | | - %14 = hal.interface.binding.subspan layout(#pipeline_layout) binding(0) alignment(64) offset(%5) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320xf32>> |
29 | | - %15 = hal.interface.binding.subspan layout(#pipeline_layout) binding(2) alignment(64) offset(%9) : !iree_tensor_ext.dispatch.tensor<writeonly:tensor<1x320x64x64xf32>> |
30 | | - %16 = iree_tensor_ext.dispatch.tensor.load %10, offsets = [0, 0, 0, 0], sizes = [1, 320, 64, 64], strides = [1, 1, 1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320x64x64xf32>> -> tensor<1x320x64x64xf32> |
31 | | - %17 = iree_tensor_ext.dispatch.tensor.load %11, offsets = [0, 0, 0, 0], sizes = [320, 320, 3, 3], strides = [1, 1, 1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<320x320x3x3xf32>> -> tensor<320x320x3x3xf32> |
32 | | - %18 = iree_tensor_ext.dispatch.tensor.load %12, offsets = [0, 0], sizes = [1, 320], strides = [1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320xf32>> -> tensor<1x320xf32> |
33 | | - %19 = iree_tensor_ext.dispatch.tensor.load %13, offsets = [0, 0], sizes = [1, 320], strides = [1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320xf32>> -> tensor<1x320xf32> |
34 | | - %20 = iree_tensor_ext.dispatch.tensor.load %14, offsets = [0, 0], sizes = [1, 320], strides = [1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320xf32>> -> tensor<1x320xf32> |
35 | | - %21 = tensor.empty() : tensor<1x320x64x64xf32> |
36 | | - %22 = linalg.fill ins(%cst : f32) outs(%21 : tensor<1x320x64x64xf32>) -> tensor<1x320x64x64xf32> |
37 | | - %padded = tensor.pad %16 low[0, 0, 1, 1] high[0, 0, 1, 1] { |
| 12 | + %0 = hal.interface.binding.subspan layout(#pipeline_layout) binding(0) alignment(64) offset(%c0) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320x64x64xf32>> |
| 13 | + %1 = hal.interface.binding.subspan layout(#pipeline_layout) binding(1) alignment(64) offset(%c0) flags(ReadOnly) : !iree_tensor_ext.dispatch.tensor<readonly:tensor<320x320x3x3xf32>> |
| 14 | + %2 = hal.interface.binding.subspan layout(#pipeline_layout) binding(2) alignment(64) offset(%c0) : !iree_tensor_ext.dispatch.tensor<writeonly:tensor<1x320x64x64xf32>> |
| 15 | + %3 = iree_tensor_ext.dispatch.tensor.load %0, offsets = [0, 0, 0, 0], sizes = [1, 320, 64, 64], strides = [1, 1, 1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<1x320x64x64xf32>> -> tensor<1x320x64x64xf32> |
| 16 | + %4 = iree_tensor_ext.dispatch.tensor.load %1, offsets = [0, 0, 0, 0], sizes = [320, 320, 3, 3], strides = [1, 1, 1, 1] : !iree_tensor_ext.dispatch.tensor<readonly:tensor<320x320x3x3xf32>> -> tensor<320x320x3x3xf32> |
| 17 | + %5 = tensor.empty() : tensor<1x320x64x64xf32> |
| 18 | + %6 = linalg.fill ins(%cst : f32) outs(%5 : tensor<1x320x64x64xf32>) -> tensor<1x320x64x64xf32> |
| 19 | + %padded = tensor.pad %3 low[0, 0, 1, 1] high[0, 0, 1, 1] { |
38 | 20 | ^bb0(%arg0: index, %arg1: index, %arg2: index, %arg3: index): |
39 | 21 | tensor.yield %cst : f32 |
40 | 22 | } : tensor<1x320x64x64xf32> to tensor<1x320x66x66xf32> |
41 | | - %23 = linalg.conv_2d_nchw_fchw {dilations = dense<1> : vector<2xi64>, strides = dense<1> : vector<2xi64>} ins(%padded, %17 : tensor<1x320x66x66xf32>, tensor<320x320x3x3xf32>) outs(%22 : tensor<1x320x64x64xf32>) -> tensor<1x320x64x64xf32> |
42 | | - iree_tensor_ext.dispatch.tensor.store %23, %15, offsets = [0, 0, 0, 0], sizes = [1, 320, 64, 64], strides = [1, 1, 1, 1] : tensor<1x320x64x64xf32> -> !iree_tensor_ext.dispatch.tensor<writeonly:tensor<1x320x64x64xf32>> |
| 23 | + %7 = linalg.conv_2d_nchw_fchw {dilations = dense<1> : vector<2xi64>, strides = dense<1> : vector<2xi64>} ins(%padded, %4 : tensor<1x320x66x66xf32>, tensor<320x320x3x3xf32>) outs(%6 : tensor<1x320x64x64xf32>) -> tensor<1x320x64x64xf32> |
| 24 | + iree_tensor_ext.dispatch.tensor.store %7, %2, offsets = [0, 0, 0, 0], sizes = [1, 320, 64, 64], strides = [1, 1, 1, 1] : tensor<1x320x64x64xf32> -> !iree_tensor_ext.dispatch.tensor<writeonly:tensor<1x320x64x64xf32>> |
43 | 25 | return |
44 | 26 | } |
45 | 27 |
|
|
0 commit comments