-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VectorExt] Add support for masking for toLayout vectorization
Currently, when we vectorize toLayout ops it expects the source to be statically shaped. However, if we are to vectorize dynamic shaped tensor to static shaped vector, toLayout op needs to perform masking. This commit adds support to add masking in the process of vectorization of toLayout op. Signed-off-by: Manupa Karunaratne <[email protected]>
- Loading branch information
Showing
5 changed files
with
163 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
30 changes: 30 additions & 0 deletions
30
compiler/src/iree/compiler/Codegen/Dialect/VectorExt/Transforms/test/BUILD.bazel
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2024 The IREE Authors | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# Tests for common transforms. | ||
|
||
load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob") | ||
load("//build_tools/bazel:iree_lit_test.bzl", "iree_lit_test_suite") | ||
|
||
package( | ||
features = ["layering_check"], | ||
licenses = ["notice"], # Apache 2.0 | ||
) | ||
|
||
iree_lit_test_suite( | ||
name = "lit", | ||
srcs = enforce_glob( | ||
[ | ||
"vectorize_vector_ext_ops.mlir", | ||
], | ||
include = ["*.mlir"], | ||
), | ||
cfg = "//compiler:lit.cfg.py", | ||
tools = [ | ||
"//tools:iree-opt", | ||
"@llvm-project//llvm:FileCheck", | ||
], | ||
) |
23 changes: 23 additions & 0 deletions
23
compiler/src/iree/compiler/Codegen/Dialect/VectorExt/Transforms/test/CMakeLists.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
################################################################################ | ||
# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from # | ||
# compiler/src/iree/compiler/Codegen/Dialect/VectorExt/Transforms/test/BUILD.bazel# | ||
# # | ||
# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary # | ||
# CMake-only content. # | ||
# # | ||
# To disable autogeneration for this file entirely, delete this header. # | ||
################################################################################ | ||
|
||
iree_add_all_subdirs() | ||
|
||
iree_lit_test_suite( | ||
NAME | ||
lit | ||
SRCS | ||
"vectorize_vector_ext_ops.mlir" | ||
TOOLS | ||
FileCheck | ||
iree-opt | ||
) | ||
|
||
### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ### |
This file contains 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