From f156c245c1b589f1aa3ab043a5eb4185a697fa1a Mon Sep 17 00:00:00 2001 From: thomasraoux Date: Wed, 10 Mar 2021 16:48:46 -0800 Subject: [PATCH 1/4] Synchronize submodules with LLVM at llvm/llvm-project@4c973ae51b85 --- SUBMODULE_VERSIONS.txt | 6 +++--- third_party/llvm-bazel | 2 +- third_party/mlir-hlo | 2 +- third_party/tensorflow | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SUBMODULE_VERSIONS.txt b/SUBMODULE_VERSIONS.txt index 03957dfdb0fa..7e57652eacf2 100644 --- a/SUBMODULE_VERSIONS.txt +++ b/SUBMODULE_VERSIONS.txt @@ -4,16 +4,16 @@ daff5fead3fbe22c6fc58310ca3f49caf117f185 third_party/benchmark 4fb0ff7069bd88ee85902f4d0bb62794e5f6d021 third_party/flatcc b1fbd33c06cdb0024c67733c6fdec2009d17b384 third_party/googletest 88b845dee001723c4a0db1fe5477de735b6d3bb0 third_party/liburing -5d2cd83f8d192aff5cc4846ab7bb3362c7b82189 third_party/llvm-bazel +37bd064d4f2793bb8b3974233aa39bb227ba2364 third_party/llvm-bazel 4c973ae51b859dca9792e1ad87a6673c49815a8d third_party/llvm-project e691ab9fc49d728f6632408d534b82cb3d137b3f third_party/mlir-emitc -c217a6ef61d8bc3eeb407d3c09bb343de2dbe769 third_party/mlir-hlo +9902e6ee329ba10cb0e2145ce1aa7299d7a60405 third_party/mlir-hlo 2b2bd45bbf9be04fd22ece5cc1f54679202e9257 third_party/pffft d8c7ee00a687ac369e62e2032514a93a9b413502 third_party/pybind11 2887692065c38ef6617f423feafc6b69dd0a0681 third_party/ruy 685f86471e9d26b3eb7676695a2e2cefb4551ae9 third_party/spirv_cross f8bf11a0253a32375c32cad92c841237b96696c0 third_party/spirv_headers -09b2d2ab376a39bfcfe887fa57d03c0ae5bb6d1d third_party/tensorflow +888eae61f875e23a27e368f59915ed95ebafde72 third_party/tensorflow 9c3dac3ed2bd647b8d63f197fed058fee97a7e1e third_party/tracy 9bd3f561bcee3f01d22912de10bb07ce4e23d378 third_party/vulkan_headers 3528e2aed3e8808f33e1e7d63eeb1560456a605a third_party/vulkan_memory_allocator diff --git a/third_party/llvm-bazel b/third_party/llvm-bazel index 5d2cd83f8d19..37bd064d4f27 160000 --- a/third_party/llvm-bazel +++ b/third_party/llvm-bazel @@ -1 +1 @@ -Subproject commit 5d2cd83f8d192aff5cc4846ab7bb3362c7b82189 +Subproject commit 37bd064d4f2793bb8b3974233aa39bb227ba2364 diff --git a/third_party/mlir-hlo b/third_party/mlir-hlo index c217a6ef61d8..9902e6ee329b 160000 --- a/third_party/mlir-hlo +++ b/third_party/mlir-hlo @@ -1 +1 @@ -Subproject commit c217a6ef61d8bc3eeb407d3c09bb343de2dbe769 +Subproject commit 9902e6ee329ba10cb0e2145ce1aa7299d7a60405 diff --git a/third_party/tensorflow b/third_party/tensorflow index 09b2d2ab376a..888eae61f875 160000 --- a/third_party/tensorflow +++ b/third_party/tensorflow @@ -1 +1 @@ -Subproject commit 09b2d2ab376a39bfcfe887fa57d03c0ae5bb6d1d +Subproject commit 888eae61f875e23a27e368f59915ed95ebafde72 From 0f70af606436e15aadf03b087d2bb63d9890948a Mon Sep 17 00:00:00 2001 From: iree-copybara-bot Date: Wed, 10 Mar 2021 12:34:07 -0800 Subject: [PATCH 2/4] Integrate LLVM at llvm/llvm-project@4c973ae51b85 Updates LLVM usage to match [4c973ae51b85](https://github.com/llvm/llvm-project/commit/4c973ae51b85) PiperOrigin-RevId: 362116801 --- SUBMODULE_VERSIONS.txt | 2 +- .../Transforms/test/dispatch_linalg_on_tensors.mlir | 8 ++++---- .../test/dispatch_linalg_on_tensors_dynamic.mlir | 10 ++++++---- third_party/llvm-project | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/SUBMODULE_VERSIONS.txt b/SUBMODULE_VERSIONS.txt index ec9bad50888b..03957dfdb0fa 100644 --- a/SUBMODULE_VERSIONS.txt +++ b/SUBMODULE_VERSIONS.txt @@ -5,7 +5,7 @@ daff5fead3fbe22c6fc58310ca3f49caf117f185 third_party/benchmark b1fbd33c06cdb0024c67733c6fdec2009d17b384 third_party/googletest 88b845dee001723c4a0db1fe5477de735b6d3bb0 third_party/liburing 5d2cd83f8d192aff5cc4846ab7bb3362c7b82189 third_party/llvm-bazel -df6d0579e18e868ef4b6e97794eacd5af86e1b8a third_party/llvm-project +4c973ae51b859dca9792e1ad87a6673c49815a8d third_party/llvm-project e691ab9fc49d728f6632408d534b82cb3d137b3f third_party/mlir-emitc c217a6ef61d8bc3eeb407d3c09bb343de2dbe769 third_party/mlir-hlo 2b2bd45bbf9be04fd22ece5cc1f54679202e9257 third_party/pffft diff --git a/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors.mlir b/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors.mlir index 3895e67c9ed1..a4506b7c640d 100644 --- a/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors.mlir +++ b/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors.mlir @@ -1,8 +1,8 @@ // RUN: iree-opt -split-input-file -verify-diagnostics -iree-flow-dispatch-linalg-on-tensors-pass -iree-flow-dispatch-linalg-on-tensors-tile-sizes="1,2" -iree-flow-dispatch-linalg-on-tensors-enable-fusion-always -canonicalize -cse %s | IreeFileCheck %s -// CHECK-DAG: #[[$MAP:.*]] = affine_map<(d0) -> (2, -d0 + 4)> +// CHECK: #[[mul_map:.+]] = affine_map<()[s0] -> (s0 * 2)> -// CHECK-LABEL: func @tensor +// CHECK: func @tensor func @tensor() -> tensor<2x4xf32> { // CHECK-DAG: %[[C1wg:.*]] = constant 1 : index // CHECK-DAG: %[[C2wg:.*]] = constant 2 : index @@ -33,8 +33,8 @@ func @tensor() -> tensor<2x4xf32> { // CHECK-DAG: %[[biy:.*]] = flow.dispatch.workgroup.id[1] : index // CHECK-DAG: %[[bdy:.*]] = flow.dispatch.workgroup.count[1] : index // CHECK: scf.for %[[I:.*]] = %[[biy]] to %[[C2]] step %[[bdy]] { - // CHECK-NEXT: %[[bix_scaled:.*]] = muli %[[bix]], %[[C2]] : index - // CHECK-NEXT: %[[bdx_scaled:.*]] = muli %[[bdx]], %[[C2]] : index + // CHECK-NEXT: %[[bix_scaled:.*]] = affine.apply #[[mul_map]]()[%[[bix]]] + // CHECK-NEXT: %[[bdx_scaled:.*]] = affine.apply #[[mul_map]]()[%[[bdx]]] // CHECK-NEXT: scf.for %[[J:.*]] = %[[bix_scaled]] to %[[C4]] step %[[bdx_scaled]] { // Canonicalizations not yet powerful enough here. // CHECK-NEXT: %[[MIN_I:.*]] = affine.min{{.*}}(%[[I]]) diff --git a/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors_dynamic.mlir b/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors_dynamic.mlir index d47e7ea17b77..410529e02107 100644 --- a/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors_dynamic.mlir +++ b/iree/compiler/Dialect/Flow/Transforms/test/dispatch_linalg_on_tensors_dynamic.mlir @@ -1,5 +1,7 @@ // RUN: iree-opt -split-input-file -verify-diagnostics -iree-flow-dispatch-linalg-on-tensors-pass -canonicalize -cse %s | IreeFileCheck %s +// CHECK: #[[MULMAP:.+]] = affine_map<()[s0, s1] -> (s0 * s1)> + func @tensor(%arg0 : tensor, %arg1 : tensor, %arg2 : tensor) -> tensor { %1 = linalg.matmul ins(%arg0, %arg1 : tensor, tensor) @@ -23,12 +25,12 @@ func @tensor(%arg0 : tensor, %arg1 : tensor, // CHECK-DAG: %[[WGID_Y:.+]] = flow.dispatch.workgroup.id[1] // CHECK-DAG: %[[WGCOUNT_X:.+]] = flow.dispatch.workgroup.count[0] // CHECK-DAG: %[[WGCOUNT_Y:.+]] = flow.dispatch.workgroup.count[1] -// CHECK: %[[OFFSET_Y:.+]] = muli %[[WGSIZE_Y]], %[[WGID_Y]] -// CHECK: %[[STEP_Y:.+]] = muli %[[WGSIZE_Y]], %[[WGCOUNT_Y]] +// CHECK: %[[OFFSET_Y:.+]] = affine.apply #[[MULMAP]]()[%[[WGID_Y]], %[[WGSIZE_Y]]] +// CHECK: %[[STEP_Y:.+]] = affine.apply #[[MULMAP]]()[%[[WGCOUNT_Y]], %[[WGSIZE_Y]]] // CHECK: scf.for %[[ARG7:.+]] = %[[OFFSET_Y]] // CHECK-SAME: to %{{.+}} step %[[STEP_Y]] -// CHECK: %[[OFFSET_X:.+]] = muli %[[WGSIZE_X]], %[[WGID_X]] -// CHECK: %[[STEP_X:.+]] = muli %[[WGSIZE_X]], %[[WGCOUNT_X]] +// CHECK: %[[OFFSET_X:.+]] = affine.apply #[[MULMAP]]()[%[[WGID_X]], %[[WGSIZE_X]]] +// CHECK: %[[STEP_X:.+]] = affine.apply #[[MULMAP]]()[%[[WGCOUNT_X]], %[[WGSIZE_X]]] // CHECK: scf.for %[[ARG8:.+]] = %[[OFFSET_X]] // CHECK-SAME: to %{{.+}} step %[[STEP_X]] // CHECK: %[[LHS:.+]] = flow.dispatch.input.load %[[ARG3]] diff --git a/third_party/llvm-project b/third_party/llvm-project index df6d0579e18e..4c973ae51b85 160000 --- a/third_party/llvm-project +++ b/third_party/llvm-project @@ -1 +1 @@ -Subproject commit df6d0579e18e868ef4b6e97794eacd5af86e1b8a +Subproject commit 4c973ae51b859dca9792e1ad87a6673c49815a8d From c0ae7a2326691b32468b147934cc03488545144c Mon Sep 17 00:00:00 2001 From: iree-copybara-bot Date: Thu, 11 Mar 2021 14:17:16 -0800 Subject: [PATCH 3/4] Integrate LLVM at llvm/llvm-project@720a828045e1 Updates LLVM usage to match [720a828045e1](https://github.com/llvm/llvm-project/commit/720a828045e1) PiperOrigin-RevId: 362375825 --- SUBMODULE_VERSIONS.txt | 2 +- iree/compiler/Conversion/Common/Transforms.cpp | 2 +- iree/compiler/Conversion/LinalgToSPIRV/ConvertToGPUPass.cpp | 2 +- third_party/llvm-project | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SUBMODULE_VERSIONS.txt b/SUBMODULE_VERSIONS.txt index 7e57652eacf2..60ea36808643 100644 --- a/SUBMODULE_VERSIONS.txt +++ b/SUBMODULE_VERSIONS.txt @@ -5,7 +5,7 @@ daff5fead3fbe22c6fc58310ca3f49caf117f185 third_party/benchmark b1fbd33c06cdb0024c67733c6fdec2009d17b384 third_party/googletest 88b845dee001723c4a0db1fe5477de735b6d3bb0 third_party/liburing 37bd064d4f2793bb8b3974233aa39bb227ba2364 third_party/llvm-bazel -4c973ae51b859dca9792e1ad87a6673c49815a8d third_party/llvm-project +720a828045e1095ec7bd69c84fa1cd9c431a3179 third_party/llvm-project e691ab9fc49d728f6632408d534b82cb3d137b3f third_party/mlir-emitc 9902e6ee329ba10cb0e2145ce1aa7299d7a60405 third_party/mlir-hlo 2b2bd45bbf9be04fd22ece5cc1f54679202e9257 third_party/pffft diff --git a/iree/compiler/Conversion/Common/Transforms.cpp b/iree/compiler/Conversion/Common/Transforms.cpp index 2df2008e4528..13bc5cef12c6 100644 --- a/iree/compiler/Conversion/Common/Transforms.cpp +++ b/iree/compiler/Conversion/Common/Transforms.cpp @@ -185,7 +185,7 @@ static Optional tileAndFuseLinalgOps( // over to linalg on tensors. linalg::LinalgOp rootOp = fusableOps.back(); Optional> staticLoopRange = - linalg::getStaticLoopRanges(rootOp); + rootOp.getStaticLoopRanges(); if (!staticLoopRange || llvm::any_of(staticLoopRange.getValue(), [](int64_t d) { return d == ShapedType::kDynamicSize; })) { diff --git a/iree/compiler/Conversion/LinalgToSPIRV/ConvertToGPUPass.cpp b/iree/compiler/Conversion/LinalgToSPIRV/ConvertToGPUPass.cpp index 5e6d91777216..a7c51deab0d5 100644 --- a/iree/compiler/Conversion/LinalgToSPIRV/ConvertToGPUPass.cpp +++ b/iree/compiler/Conversion/LinalgToSPIRV/ConvertToGPUPass.cpp @@ -700,7 +700,7 @@ struct MapLinalgOpToGlobalInvocationId // TODO (GH-4901): Only support static shapes on this path. This should be // removed when moved to linalg on tensors. Optional> staticLoopRange = - linalg::getStaticLoopRanges(linalgOp); + linalgOp.getStaticLoopRanges(); if (!staticLoopRange || llvm::any_of(staticLoopRange.getValue(), [](int64_t d) { return d == ShapedType::kDynamicSize; diff --git a/third_party/llvm-project b/third_party/llvm-project index 4c973ae51b85..720a828045e1 160000 --- a/third_party/llvm-project +++ b/third_party/llvm-project @@ -1 +1 @@ -Subproject commit 4c973ae51b859dca9792e1ad87a6673c49815a8d +Subproject commit 720a828045e1095ec7bd69c84fa1cd9c431a3179 From 284e68c6bea32a0299688f76f8199b5e545ac288 Mon Sep 17 00:00:00 2001 From: Thomas Raoux Date: Thu, 11 Mar 2021 16:58:54 -0800 Subject: [PATCH 4/4] Synchronize submodules with LLVM at llvm/llvm-project@720a828045e1 Updates LLVM dependencies to match [720a828045e1](https://github.com/llvm/llvm-project/commit/720a828045e1). - llvm-bazel to [4e9c6abfb047](https://github.com/google/llvm-bazel/commit/4e9c6abfb047) - TensorFlow to [c968e5fb8723](https://github.com/tensorflow/tensorflow/commit/c968e5fb8723) - MLIR-HLO to [d16860d26dff](https://github.com/tensorflow/mlir-hlo/commit/d16860d26dff) `./scripts/git/update_to_llvm_syncpoint.py ` COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/5076 from google:llvm-dependent-submodule-update 9df36a1b39539f3500aada9241c55396b93a2a76 PiperOrigin-RevId: 362409147 --- SUBMODULE_VERSIONS.txt | 6 +++--- third_party/llvm-bazel | 2 +- third_party/mlir-hlo | 2 +- third_party/tensorflow | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SUBMODULE_VERSIONS.txt b/SUBMODULE_VERSIONS.txt index 60ea36808643..8ed5c925a7ee 100644 --- a/SUBMODULE_VERSIONS.txt +++ b/SUBMODULE_VERSIONS.txt @@ -4,16 +4,16 @@ daff5fead3fbe22c6fc58310ca3f49caf117f185 third_party/benchmark 4fb0ff7069bd88ee85902f4d0bb62794e5f6d021 third_party/flatcc b1fbd33c06cdb0024c67733c6fdec2009d17b384 third_party/googletest 88b845dee001723c4a0db1fe5477de735b6d3bb0 third_party/liburing -37bd064d4f2793bb8b3974233aa39bb227ba2364 third_party/llvm-bazel +4e9c6abfb047b811efd606ed42ed92ac5c66285d third_party/llvm-bazel 720a828045e1095ec7bd69c84fa1cd9c431a3179 third_party/llvm-project e691ab9fc49d728f6632408d534b82cb3d137b3f third_party/mlir-emitc -9902e6ee329ba10cb0e2145ce1aa7299d7a60405 third_party/mlir-hlo +d16860d26dffb8eabf0c8ab004c2d70d115dfc2f third_party/mlir-hlo 2b2bd45bbf9be04fd22ece5cc1f54679202e9257 third_party/pffft d8c7ee00a687ac369e62e2032514a93a9b413502 third_party/pybind11 2887692065c38ef6617f423feafc6b69dd0a0681 third_party/ruy 685f86471e9d26b3eb7676695a2e2cefb4551ae9 third_party/spirv_cross f8bf11a0253a32375c32cad92c841237b96696c0 third_party/spirv_headers -888eae61f875e23a27e368f59915ed95ebafde72 third_party/tensorflow +c968e5fb8723ba005d728a56306cb4c915eba11d third_party/tensorflow 9c3dac3ed2bd647b8d63f197fed058fee97a7e1e third_party/tracy 9bd3f561bcee3f01d22912de10bb07ce4e23d378 third_party/vulkan_headers 3528e2aed3e8808f33e1e7d63eeb1560456a605a third_party/vulkan_memory_allocator diff --git a/third_party/llvm-bazel b/third_party/llvm-bazel index 37bd064d4f27..4e9c6abfb047 160000 --- a/third_party/llvm-bazel +++ b/third_party/llvm-bazel @@ -1 +1 @@ -Subproject commit 37bd064d4f2793bb8b3974233aa39bb227ba2364 +Subproject commit 4e9c6abfb047b811efd606ed42ed92ac5c66285d diff --git a/third_party/mlir-hlo b/third_party/mlir-hlo index 9902e6ee329b..d16860d26dff 160000 --- a/third_party/mlir-hlo +++ b/third_party/mlir-hlo @@ -1 +1 @@ -Subproject commit 9902e6ee329ba10cb0e2145ce1aa7299d7a60405 +Subproject commit d16860d26dffb8eabf0c8ab004c2d70d115dfc2f diff --git a/third_party/tensorflow b/third_party/tensorflow index 888eae61f875..c968e5fb8723 160000 --- a/third_party/tensorflow +++ b/third_party/tensorflow @@ -1 +1 @@ -Subproject commit 888eae61f875e23a27e368f59915ed95ebafde72 +Subproject commit c968e5fb8723ba005d728a56306cb4c915eba11d