Skip to content

Add support for reading input values from a file for IREE tools - #2545

Merged
hanhanW merged 47 commits into
iree-org:mainfrom
hanhanW:read-from-file2
Jul 17, 2020
Merged

hanhanW merged 47 commits into
iree-org:mainfrom
hanhanW:read-from-file2

Conversation

@hanhanW

@hanhanW hanhanW commented Jul 16, 2020

Copy link
Copy Markdown
Contributor
  • Move parsing methods to vm_util.
  • Enable the feature for benchmark_module and run_module as well.

Fixes #2304

iree-copybara-bot and others added 23 commits July 14, 2020 15:47
Updates TF to current HEAD
(tensorflow/tensorflow@ebcd2928f5b0)
and copies over the LLVM BUILD files.

Also updated TensorFlow HLO CMakeLists for hlo_patterns.td.

Closes iree-org#2516 and iree-org#2527.

COPYBARA_INTEGRATE_REVIEW=iree-org#2527 from ScottTodd:submodule-update 57f656c
PiperOrigin-RevId: 321390230
This currently creates a hal module in C++ with a default device, and does not yet allow for driver/device creation on the java side

PiperOrigin-RevId: 321426725
"Updates TF to current HEAD and copies latest version of LLVM BUILD files.

Automated submodule bump from .github/workflows/update_tf.yml"

COPYBARA_INTEGRATE_REVIEW=iree-org#2529 from google:auto_submodule_update 33938b4
PiperOrigin-RevId: 321579485
- Move parsing method to vm_util.
- Enable the feature for benchmark_module and run_module as well.

Fixes iree-org#2304
- Move parsing method to vm_util.
- Enable the feature for benchmark_module and run_module as well.

Fixes iree-org#2304
benvanik and others added 4 commits July 16, 2020 12:33
* b2145c7 Synchronize submodules                                                          
* 13bdb7e Integrate TF at tensorflow/tensorflow@33a4c1a0aba     
* c89e8ee Merge pull request iree-org#2543 from ScottTodd:main-to-google                          
* 8be9242 Synchronize submodules                                                          
* b0737d2 Integrate LLVM at llvm/llvm-project@1067d3e176ea      
* 3e574a9 Synchronize submodules                                                          
* d875628 Integrate LLVM at llvm/llvm-project@b2018198c32a      
* 28e7bc2 Synchronize submodules                                                          
* 3f7687c Integrate LLVM at llvm/llvm-project@f233b92f92a6      
* af5f150 Adds a way to register modules with the context through the java API            
* 79586bd Synchronize submodules                                                          
* 95d8c9f Integrate TF at ebcd2928f5b0                                                    
* 3aadd21 Synchronize submodules                                                          
* 0ee9524 Integrate LLVM at llvm/llvm-project@c11c78a1bd0b      
* 0bdd8f2 Synchronize submodules                                                          
* 89bf08f Integrate LLVM at llvm/llvm-project@f782d9c7002e      
* 764c9dd Merge pull request iree-org#2512 from ScottTodd:main-to-google
Contains some recommendations for tools and git setup for people
contributing to IREE. This is an opinionated guide that is largely just
*my* setup, but I know it overlaps significantly with other people's as
well and hopefully it can evolve into something more general.
Comment thread iree/tools/vm_util.h Outdated
const iree_vm_function_t& function);

// Parses the content in |filename| into a variant list of VM scalars and
// buffers. See below for the format of scalars and buffers. The inputs are

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/below/ParseToVariantList/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

ScottTodd and others added 2 commits July 16, 2020 14:48
For consistency (and mysterious Google tooling reasons.....)
This will make PRs/commits with a title that's within standard
character limits but still linkified by GitHub. It matches the style
in the `scripts/git/update_tf_submodule.sh` script.

@GMNGeoffrey GMNGeoffrey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

Comment thread iree/tools/benchmark_module_main.cc Outdated
if (!absl::GetFlag(FLAGS_inputs_file).empty()) {
if (!absl::GetFlag(FLAGS_inputs).empty()) {
return InvalidArgumentErrorBuilder(IREE_LOC)
<< "Expected only one of inputs and inputs_flag is set";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: grammar

Suggested change
<< "Expected only one of inputs and inputs_flag is set";
<< "Expected only one of inputs and inputs_flag to be set";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread iree/tools/run_mlir_main.cc Outdated
@@ -298,9 +281,9 @@ Status EvaluateFunction(iree_vm_context_t* context,
<< "Expected only one of input_values_file_flag and "
"input_values_flag is set";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"input_values_flag is set";
"input_values_flag to be set";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread iree/tools/run_module_main.cc Outdated
if (!absl::GetFlag(FLAGS_inputs_file).empty()) {
if (!absl::GetFlag(FLAGS_inputs).empty()) {
return InvalidArgumentErrorBuilder(IREE_LOC)
<< "Expected only one of inputs and inputs_flag is set";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<< "Expected only one of inputs and inputs_flag is set";
<< "Expected only one of inputs and inputs_flag to be set";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

GMNGeoffrey and others added 12 commits July 16, 2020 17:17
- Factor update into a separate script. It's pretty verbose.
- Fetch the base branch for doing comparisons in merge scripts.
- Have uniform error handling for missing `gh`
- Some other consistency between the scripts.
- Turn of `set -x`. Current script messaging is better than that
  gets us.

Example PRs created by these scripts (because testing in prod
is the only testing):
iree-org#2554
iree-org#2555
iree-org#2553
* Fix Werror specification and fix unused variable.

* Set -Wno-macro-redefined.

* Link to GitHub issue for reenabling warning.
- Move parsing method to vm_util.
- Enable the feature for benchmark_module and run_module as well.

Fixes iree-org#2304
- Move parsing method to vm_util.
- Enable the feature for benchmark_module and run_module as well.

Fixes iree-org#2304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support tools to read input values from a file