Repository navigation
Refactors tf_test_utils, creating tf_utils and simplifying module specification. - #2452
Merged
phoenix-meadowlark merged 9 commits intoJul 10, 2020
Merged
Conversation
phoenix-meadowlark
force-pushed
the
tf-test-utils-refactor
branch
2 times, most recently
from
July 9, 2020 02:38
c676ebb to
2de1654
Compare
rybakov
reviewed
Jul 9, 2020
rybakov
reviewed
Jul 9, 2020
rybakov
reviewed
Jul 9, 2020
phoenix-meadowlark
marked this pull request as ready for review
July 9, 2020 17:56
silvasean
suggested changes
Jul 9, 2020
silvasean
approved these changes
Jul 10, 2020
…cification. PiperOrigin-RevId: 320108948
phoenix-meadowlark
force-pushed
the
tf-test-utils-refactor
branch
2 times, most recently
from
July 10, 2020 16:58
e5b985b to
de1c299
Compare
phoenix-meadowlark
force-pushed
the
tf-test-utils-refactor
branch
from
July 10, 2020 17:22
de1c299 to
ed692db
Compare
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.
set_random_seedandsave_and_compile_tf_moduleout oftf_test_utils.pyinto the newtf_utils.py.compile_tf_moduleto be that it doesn't keep the saved model, since it's for most purposes an implementation detail. The main exceptions to this are the cases of comparing IREE benchmarks to other frameworks, and providing debugging info for tests.tf_test_utils.compile_moduleAPI by removing support for tests that have multiple modules.CompiledModuleswas referenced withself.modules.module_name.all, and is now referenced withself.get_module().CompiledModules can still be referenced usingself.compiled_modules.backend_name.Additionally, whether or not compilation artifacts were being saved was inconsistently controlled by
FLAGS.debug_dir. Some compilation artifacts were being saved to--test_tempdirinFLAGS.debug_dirs absence, while other compilation artifacts and the results of the test invocations weren't.I changed the behavior to here to always save all compilation artifacts and results in
FLAGS.debug_dir/test_nameifFLAGS.debug_diris provided, and in--test_tempdir/test_nameotherwise.Incidental changes:
exported_names_test.pyas it was redundant.iree_compiler_targets=["vulkan-*"]created artifact names likecompiled__vulkan_.vmfb.