Merge main -> google#7486
Merged
Merged
Conversation
…ee-org#7385) Previously these were defined using StructAttr which is limited in its capabilities. Moving them to AttrDef allows this to be more robust and verifiable. Also allows specification of custom builder methods that remove a lot of the bioler plate. In addition to the above, this change also adds a new attribute, CompilationInfoAttr. This is the attribute that when added to operations like linalg.matmul/linalg.*conv* (or their mhlo/tosa couterparts) use the information from the specified attribute instead of the default heuristics. This allows an external search to search for better values than the defaults used. While there are some preliminary verifies in place, additional verifiers are needed to ensure that the user-provided attribute has all the information needed (and in a consistent manner) to achieve correct compilation. In addition, all these attributes are moved from the HAL dialect into a new IREECodegenDialect added to compiler/Codegen/Dialect. This change also brings in some code from D111594 to allow for this to land without having to wait for that patch to land.
) Just some improvement to how we use python in this file. Should be a no-op change. Fixes iree-org#7431 .
This reverts commit cc4f173. Reason to revert: the change creates unaligned buffer fill Change-Id: Iff9ba0d9f4b4993f8388ac9af8a2ba6aba577d77
Since flow dispatch region formation now creates dispatches through tile + fuse + distribute, the direct distribution path is no more used. Remove this code.
We were already doing our own runtime library slicing, and we have to do our own compiler build for bazel, so this is consistent and lets us avoid including their cmake file (and the issues that creates).
TEST=build samples and tests on M1
This is mostly with the goal of adding additional fields, like a TFLite
input file. Includes some new CMake functions/macros that I think will
be helpful in general.
Tested:
Verified no diff in the CMake build dir, excluding log files and a
timestamp-dependent SPIRV thing.
```shell
$ diff -r -q \
--exclude '*.log' \
--exclude gitversion.h \
/tmp/benchmarks_old \
~/build/iree/benchmarks_test/
```
…7475) When I wrote these tests, I put great care in ensuring low test run latency. But I didn't think about test compilation latency. So this PR reduces these build times in two different ways: 1. By commenting out half of the shapes in get_test_shapes. I've retained ~ 50% of the shapes that I believe provide ~ 90% of the coverage. The remaining 10% coverage will only start to matter later when we start to make the matmul implementation do more complicated things, and we can uncomment those shapes then. 2. By ensuring that testcases that test the same exact code (differing only by runtime data) actually share that code already at the source level (without relying on CSE, which might kick in too late to recover the best compilation latency), by changing generate_function_name to generate the same exact name, so that we're sure that we insert only one. There are two sub-cases here: a. Testcases that differ in dynamic shape dimensions. Before we could have functions foo_2x2(tensor<?x?xf32>) and foo_3x3(tensor<?x?xf32>) doing the same thing, only differing in the dynamic shapes that they are called on. Now it's foo_DYNxDYN(tensor<?x?xf32>). b. Testcases that differ in the generator of matrix element that they are called with. Before we would have foo_identity(tensor<4x4xf32>) and foo_random(tensor<4x4xf32). Now it's just foo(tensor<4x4xf32>). Before: ``` $ time cmake --build . [0/2] Re-checking globbed directories... [28/28] Generating e2e_matmul_direct_i8_small_dylib-llvm-aot_dylib.vmfb real 0m56.333s user 10m24.481s sys 3m46.072s ``` After: ``` $ time cmake --build . [0/2] Re-checking globbed directories... [28/28] Generating e2e_matmul_mmt4d_i8_small_dylib-llvm-aot_dylib.vmfb real 0m22.573s user 3m34.928s sys 1m23.833s ```
…ree-org#7477) Background: earlier I attempted to make mixed types work in vector.contract lowerings, see https://reviews.llvm.org/D112508 . See the closing comment there explaining the approach and why we abandoned it in favor of promoting inputs to the destination element type in vector.contract. Another minor cleanup is folded into this PR: we are dropping the flag --iree-codegen-vectorize-linalg-mmt4d from custom iree-opt flags in the build rules for e2e matmul tests, because this pass is already enabled by default in iree-translate.
This makes the imported TF binaries more uniform with our other binaries in terms of their naming and the convenience aliases. It also factors some common logic into a function. This is only one option for changing the way the binaries are referenced. We could also use unqualified name (since we set it up so our binaries are globally unique and available by their basename). I don't think we ever came up with a consistent rule for that, other than that we shouldn't use the underscore-mangled name that only exists because CMake has weird restrictions on some target names (but not aliases).
…-org#7469) This lets us see the location the status is raised from and not the status_util file formatting the error text.
Bazel builds already had asserts enabled, so this is only about CMake builds. It's generally useful to build CI with asserts, but we wouldn't want to build only asserts-builds at all: after all, the notion that asserts are only actually assertions and don't play a part in the program's actual function, is left entirely up to the programmer, and we want to catch mistakes at that level e.g. instances of assert(is_status_ok(important_file_io()) expanding to nothing in non-asserts builds. So this PR adds IREE_ENABLE_ASSERTIONS=ON to some common build.sh scripts used for CI, but intentionally not all of them. For example, the -asan CI uses its own build.sh file and we are intentionally not adding asserts there just so we keep some non-asserts coverage (this isn't embodying an opinion about whether to conflate asserts and asan in the same builds or to keep them separate! it's just what was quick to do here). Fixes Issue iree-org#7320 .
Merged
hanhanW
added a commit
that referenced
this pull request
Oct 28, 2021
* 3d6fa5b Merge pull request #7488 from hanhanW:disable-test * 50c6566 Integrate LLVM at llvm/llvm-project@f362aea42d29 * 18e581b Merge pull request #7486 from hanhanW:main-to-google * 2b6b701 Integrate LLVM at llvm/llvm-project@6f9c25167d16 * 13d5c9c Bazel to cmake fix. * 6fa466c Synchronize submodules with LLVM at llvm/llvm-project@6cf6fa6ef1c2 * cfe8744 Integrate LLVM at llvm/llvm-project@6cf6fa6ef1c2 * 9a564d1 PR #52686: Create a hybrid tf-tfl lowering pipline for TOSA * ad21533 Integrate LLVM at llvm/llvm-project@65e795c9cad8 * e1911f0 Integrate LLVM at llvm/llvm-project@b69564d94d90 * b55487e Integrate LLVM at llvm/llvm-project@2995d29bb427 * 4b081e2 Merge pull request #7452 from hanhanW:main-to-google * a7234c4 Integrate LLVM at llvm/llvm-project@969b72fb662b * d0f61f2 Integrate LLVM at llvm/llvm-project@d55be79d7548
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tensor.extract_slice. (Avoid tie-ing input and output for dispatch fromtensor.extract_slice. #7478)LoweringConfigAttrandTranslationInfoAttrtoAttrDef. (MoveLoweringConfigAttrandTranslationInfoAttrtoAttrDef. #7385)