-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge main -> google #2925
Merged
Merged
Merge main -> google #2925
Conversation
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
Member
ScottTodd
commented
Aug 17, 2020
- 14257a6 Reworking iree_status_t/iree::Status and improving error messages across the V..
- 04925e2 Avoid recompiling e2e modules with global variables (Avoid recompiling e2e modules with global variables #2897)
- 49f6528 Improve AffineMinCanonicalization in MatmulCodegen strategy. (Improve AffineMinCanonicalization in MatmulCodegen strategy. #2901)
- 3addfc9 Fix leaks in iree/vm:stack_test. (Fix leaks in iree/vm:stack_test. #2922)
- 11b67d7 Update base:status_test to handle IREE_STATUS_FEATURE_ANNOTATIONS. (Update base:status_test to handle IREE_STATUS_FEATURE_ANNOTATIONS. #2917)
- c34ef54 Adding fallback for a lack of C11 aligned_malloc.
- a6c8ffd Changing iree_status_t to void* to avoid implicit conversions. Fixes iree_status_t/Status reworking #265.
- 4e95844 Adding iree_status_from_code to avoid direct bit manipulation.
- eff8135 Removing status result from ComputePoolingWindow.
- 35a7a27 Fixing clang/bazel warnings.
- 780f15b Removing api_time.cc now that we have a C impl.
- faff37d Replacing EXPECT/ASSERT/CHECK macros with IREE_* versions.
- 4af1db2 Removing ToApiStatus and api_util.h.
- aaa31d9 Rebasing iree::Status* on iree_status_t.
- 371a865 Moving IREE_ test macros to iree/testing/status_matchers.h.
- cdf9631 Implementing iree_status_t storage and payloads.
- 4f8afc2 Adding IREE_ARRAYSIZE to replace ABSL_ARRAYSIZE.
- 0bef300 Adding option to start fleshing out size-optimized flags for Compiling for size #898.
- 10b2711 Status tweaks to reduce binary size.
- 5c11733 Switching out some absl macros and utils for Status use.
- a23d515 Renaming ASSIGN_OR_RETURN to IREE_ASSIGN_OR_RETURN.
- 636bde3 Renaming RETURN_IF_ERROR to IREE_RETURN_IF_ERROR. Including the C++ file will ..
- 5527e48 Removing FromApiStatus and unifying IREE_RETURN_IF_ERROR macros.
- 04c39be Simplifying status_macros.h
- d6dc56a Preventing some Status copies.
- f802ed8 Simplifying status_errno and status_win32_errors.
- 61ca38a Fixing warnings found building with clang.
- e40ba8b Removing more unused status features.
- 81dacbb Preparing for removal of Status::message and simplifying comparisons.
- c2e5f94 Rebasing StatusCode to iree_status_code_t.
- fe8d5c3 Moving status_matchers to iree/testing/.
- 988e642 Simplifying source_location.
- 868789f Removing absl flags usage from Status.
- 0fee96a Removing usage of iree::Annotate.
- 9e90134 Moving status_errors.h into status.h.
- dedd2c0 Removing usage of *Error() status builders.
- ae3e4d5 Forcing status payload type to unsigned.
- afce926 Merging iree/base/platform_headers.h -> target_platform.h
- 9af824f Removing/moving some rarely used utilities.
- 75fb7ce Removing iree/base/source_location.h. Future changes will likely remove it ent..
- d5017ed iree/base/api.cc -> api.c (besides iree_time_now()).
- 02a6d66 Removing unused InitializeEnvironment from API. //iree/base:main takes care of..
- 6c62cf4 Adding IREE_STATUS_FEATURE/IREE_STATUS_MODE.
- b7c1c12 Replacing some VM macros with static inline functions.
- 033adac Adding iree_string_view_remove_prefix to round out required set for HAL.
- 14bb137 Converting iree_string_view_match_pattern -> c
- dce5f09 Removing file mapping from the C API.
- f11d9a6 Fixing type usage in iree_string_view_* functions.
- 1f9bfef Making more of iree/base/api.cc -> c
- 7816065 Removing IREE_API_NO_PROTOTYPES as it wasn't consistently used (only needed wh..
- af644dc clang-tidy fixes for VM header files (mostly macros->static inline).
- 4bb6028 Changing size values to iree_host_size_t (size_t).
- f5bd6fd Changing IREE_ALLOCATOR_* macros to static inline functions.
- 3bf301e bytecode_module.cc -> bytecode_module.c
- bce528f Adding status messages for all C status results.
- af5401f Updating iree_status_t usage and adding tons of error messages. Progress on micro changes #2..
- 3e4cb30 Improving IREE C status macros and support functions. Progress on iree_status_t/Status reworking #265.
(only needed when someone wants to use us as a dylib with dlopen)
# Conflicts: # iree/vm/value.h
//iree/base:main takes care of it and keeps us from always pulling in flags/absl/etc.
Future changes will likely remove it entirely (or simplify it).
Including the C++ file will enable support in the macro for Status.
…ree-org#2917) Otherwise the test fails in optimized builds (or other builds which disable annotations). I used macros instead of helper functions so we get line numbers for failed test checks.
…g#2901) * Improve AffineMinCanonicalization in MatmulCodegen strategy. The current solution would not fold if the dimensions were no used by ForOp or AffineMin. Add a fallback to try to optimize those cases.Also add AffineMinSCFCanonicalizationPattern to the canonicalization stage
Follow-up to iree-org#2899. The global variables `_global_ref_module` and `_global_tar_modules` are used to store compiled IREE modules for the `TracedModuleTestCase`. Storing the variables on the `TracedModuleTestCase` `cls` causes the errors in iree-org#2900, and storing the variables on the `TracedModuleTestCase` instance (via `self`) doesn't work because `tf.test.TestCase` wipes these variables before each unittest.
…oss the VM (iree-org#2849) This fixes iree-org#265 by implementing the described iree_status_t behavior and changing Status/StatusBuilder/StatusOr to wrap it. By doing this I was able to remove quite a bit of gunk that was required to move between the Google-style C++ Status and the API (such as ToApiStatus/FromApiStatus). By being able to integrate iree_status_t into the C++ types I was also able to unify all of the macros - so IREE_CHECK_OK and IREE_RETURN_IF_ERROR can take either iree_status_t or Status/etc. Because the behavior is now different we can no longer use the iree/base/google/ versions and as such I've renamed all macros such that there are no collisions with the non-IREE versions. Now, IREE_CHECK_OK/IREE_RETURN_IF_ERROR when used in C code can take optional printf-style arguments to add annotations to results, for example: `IREE_RETURN_IF_ERROR(OtherFunc(...), "with a value: %d", 5);` When used in C++ the macros still accept printf-style arguments but can also use the ostream style: `IREE_RETURN_IF_ERROR(OtherFunc(...)) << "with a value: " << 5;`. Though it's supported one shouldn't mix them! The most interesting changes in this branch are in iree/base/api.h + iree/base/api.c and the iree/base/internal/status* files. Other changes are mechanical cleanups required to avoid name conflicts, enable C compilation of core parts (or code to be used both in C and C++), and removing abseil deps from files that are C compatible. A lot of focus was put on keeping the status usage - even if source location, messages, and stack traces are attached - from increasing codesize or overhead when on the happy success path. https://gcc.godbolt.org/z/xGsPc3 For example, this chain of calls and checks:  Ends up as the minimal possible code (while still having any kind of success checks):  The error handling cases are moved out of the way and (hopefully) kept out of cache. The handlers are able to hit the tail call optimization happy path and keeps the whole function code size smaller: 
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.