diff --git a/build_tools/build_test_cpp.ps1 b/build_tools/build_test_cpp.ps1 index f7c3b7db2..f508ce5ff 100644 --- a/build_tools/build_test_cpp.ps1 +++ b/build_tools/build_test_cpp.ps1 @@ -87,11 +87,6 @@ $CMAKE_ARGS = @( if ($llvm_install_dir -and (Test-Path "$llvm_install_dir")) { echo "using existing llvm install @ $llvm_install_dir" - # TODO(max): send IREE a fix for this - # target_compile_definitions may only set INTERFACE properties on IMPORTED - $cmake_file = Resolve-Path -Path "$iree_dir/compiler/src/iree/compiler/API/CMakeLists.txt" - (Get-Content $cmake_file).Replace("if(MSVC)", "get_target_property(_imported `$`{_object_lib} IMPORTED)`n if(MSVC AND NOT `$`{_imported})") ` - | Out-File -encoding ASCII $cmake_file $CMAKE_ARGS += @( "-DIREE_BUILD_BUNDLED_LLVM=OFF" "-DClang_DIR=$llvm_install_dir/lib/cmake/clang" diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad.mlir b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad.mlir index 99f32c343..9c1be1ef0 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad.mlir +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad.mlir @@ -53,7 +53,7 @@ module attributes { transform.with_named_sequence } { %padded, %pad, %__ = transform.structured.pad %tiled_matmul { padding_values=[0 : i32, 0 : i32, 0 : i32], padding_dimensions=[0, 1, 2], - pack_paddings=[1, 1, 1], + nofold_flags=[1, 1, 1], copy_back_op="linalg.copy" } : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) %pad_dps = transform.structured.rewrite_in_destination_passing_style %pad : (!transform.any_op) -> !transform.any_op @@ -89,7 +89,7 @@ module attributes { transform.with_named_sequence } { %padded_1, %pad_1, %_ = transform.structured.pad %tiled_matmul_1 { padding_values=[0 : i32, 0 : i32, 0 : i32], padding_dimensions=[0, 1, 2], - pack_paddings=[0, 0, 1], + nofold_flags=[0, 0, 1], copy_back_op="linalg.copy" } : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) %pad_1_dps = transform.structured.rewrite_in_destination_passing_style %pad_1 : (!transform.any_op) -> !transform.any_op @@ -114,7 +114,7 @@ module attributes { transform.with_named_sequence } { %padded_reduction, %pad_reduction, %___ = transform.structured.pad %tiled_reduction { padding_values=[0 : i32, 0 : i32, 0 : i32], padding_dimensions=[0, 1, 2], - pack_paddings=[1, 1, 0], + nofold_flags=[1, 1, 0], copy_back_op="linalg.copy" } : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) %pad_2_dps = transform.structured.rewrite_in_destination_passing_style %pad_reduction : (!transform.any_op) -> !transform.any_op diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad_pack.mlir b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad_pack.mlir index c0b8e6ed1..c4b0ed57c 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad_pack.mlir +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad_pack.mlir @@ -52,7 +52,7 @@ module attributes { transform.with_named_sequence } { %padded, %pad, %__ = transform.structured.pad %tiled_matmul { padding_values=[0 : i32, 0 : i32, 0 : i32], padding_dimensions=[0, 1, 2], - pack_paddings=[1, 1, 1], + nofold_flags=[1, 1, 1], copy_back_op="linalg.copy" } : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) %pad_dps = transform.structured.rewrite_in_destination_passing_style %pad : (!transform.any_op) -> !transform.any_op diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad_pack_peel.mlir b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad_pack_peel.mlir index 829fe5995..0fa6dabd1 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad_pack_peel.mlir +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Test/transform_dialect/matmul_fill_spec_pad_pack_peel.mlir @@ -61,7 +61,7 @@ module attributes { transform.with_named_sequence } { padding_values=[0 : i32, 0 : i32, 0 : i32], padding_dimensions=[0, 1, 2], pad_to_multiple_of=[64, 64, 64], - pack_paddings=[1, 1, 1], + nofold_flags=[1, 1, 1], copy_back_op="linalg.copy" } : (!transform.any_op) -> (!transform.any_op, !transform.any_op, !transform.any_op) %pad_dps = transform.structured.rewrite_in_destination_passing_style %pad : (!transform.any_op) -> !transform.any_op diff --git a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/AMDAIEPad.cpp b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/AMDAIEPad.cpp index f6e5a80c9..36f6cecd4 100644 --- a/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/AMDAIEPad.cpp +++ b/compiler/plugins/target/AMD-AIE/iree-amd-aie/Transforms/AMDAIEPad.cpp @@ -62,11 +62,11 @@ getFirstLevelLinalgPaddingOptions(IRRewriter &rewriter, // For the operations with 2 input and 1 output operands, the packPadding // option should be [1, 1, 1]. For `linalg.conv_2d_nhwc_hwcf_q` op, there are // 5 operands, and the packPadding options should be [1, 1, 0, 0, 1]. - SmallVector packPaddings(linalgOp->getNumOperands(), false); - packPaddings[0] = true; - packPaddings[1] = true; - packPaddings.back() = true; - options.packPaddings = packPaddings; + SmallVector nofoldFlags(linalgOp->getNumOperands(), false); + nofoldFlags[0] = true; + nofoldFlags[1] = true; + nofoldFlags.back() = true; + options.nofoldFlags = nofoldFlags; options.paddingDimensions = getPaddingDimensions(linalgOp); SmallVector padToMultipleOf(options.paddingDimensions.size(), 1); @@ -87,9 +87,9 @@ getSecondLevelLinalgPaddingOptions(IRRewriter &rewriter, options.paddingValues = paddingValues; // In the second level, we only pad the output operand. - SmallVector packPaddings(linalgOp->getNumOperands(), false); - packPaddings.back() = true; - options.packPaddings = packPaddings; + SmallVector nofoldFlags(linalgOp->getNumOperands(), false); + nofoldFlags.back() = true; + options.nofoldFlags = nofoldFlags; options.paddingDimensions = getPaddingDimensions(linalgOp); SmallVector padToMultipleOf(options.paddingDimensions.size(), 1); @@ -110,10 +110,10 @@ getThirdLevelLinalgPaddingOptions(IRRewriter &rewriter, options.paddingValues = paddingValues; // In the third level, we only pad the input operands. - SmallVector packPaddings(linalgOp->getNumOperands(), false); - packPaddings[0] = true; - packPaddings[1] = true; - options.packPaddings = packPaddings; + SmallVector nofoldFlags(linalgOp->getNumOperands(), false); + nofoldFlags[0] = true; + nofoldFlags[1] = true; + options.nofoldFlags = nofoldFlags; options.paddingDimensions = getPaddingDimensions(linalgOp); SmallVector padToMultipleOf(options.paddingDimensions.size(), 1); diff --git a/third_party/iree b/third_party/iree index 2963600a6..05bbcf138 160000 --- a/third_party/iree +++ b/third_party/iree @@ -1 +1 @@ -Subproject commit 2963600a6f5a3d7a4a998ce8c7d4f9e46391c0cc +Subproject commit 05bbcf1385146d075829cd940a52bf06961614d0