Renaming tool flags to --module/function/input. (#12010)
`--module_file=` -> `--module=`
`--entry_function=` -> `--function=`
`--function_input=` -> `--input=`
diff --git a/tools/iree-benchmark-module-main.cc b/tools/iree-benchmark-module-main.cc
index e67bd5c..f04f4d1 100644
--- a/tools/iree-benchmark-module-main.cc
+++ b/tools/iree-benchmark-module-main.cc
@@ -21,7 +21,7 @@
// order to get a large sample set.
//
// By default all functions taking no inputs will be benchmarked. If a function
-// takes inputs then the user will need to specify them using --function_input=
+// takes inputs then the user will need to specify them using --input=
// flags. Depending on the input program the -iree-flow-export-benchmark-funcs
// flag can be passed to the compiler to attempt to wrap each function with
// dummy inputs however this will fail in programs with dynamically shaped
@@ -84,8 +84,8 @@
IREE_FLAG(int32_t, batch_concurrency, 1,
"Number of invocations within a batch that should run concurrently.");
-IREE_FLAG(string, entry_function, "",
- "Name of a function contained in the module specified by module_file "
+IREE_FLAG(string, function, "",
+ "Name of a function contained in the module specified by --module= "
"to run. If this is not set, all the exported functions will be "
"benchmarked and they are expected to not have input arguments.");
@@ -93,7 +93,7 @@
"Prints runtime statistics to stderr on exit.");
IREE_FLAG_LIST(
- string, function_input,
+ string, input,
"An input value or buffer of the format:\n"
" [shape]xtype=[value]\n"
" 2x2xi32=1 2 3 4\n"
@@ -437,7 +437,7 @@
IREE_RETURN_IF_ERROR(Init());
}
- auto function_name = std::string(FLAG_entry_function);
+ auto function_name = std::string(FLAG_function);
if (!function_name.empty()) {
IREE_RETURN_IF_ERROR(RegisterSpecificFunction(function_name));
} else {
@@ -478,9 +478,9 @@
&function));
IREE_CHECK_OK(iree_tooling_parse_to_variant_list(
- device_allocator_.get(), FLAG_function_input_list().values,
- FLAG_function_input_list().count,
- iree_vm_instance_allocator(instance_.get()), &inputs_));
+ device_allocator_.get(), FLAG_input_list().values,
+ FLAG_input_list().count, iree_vm_instance_allocator(instance_.get()),
+ &inputs_));
iree_string_view_t invocation_model = iree_vm_function_lookup_attr_by_name(
&function, IREE_SV("iree.abi.model"));