Repository navigation
Adding a minimal flag parser. - #5602
Conversation
866dae5 to
a5c987c
Compare
a5c987c to
ab1eede
Compare
|
I don't understand the bazel failures - @GMNGeoffrey / @ScottTodd do you recall anything about lit tests and binaries? cmake works by referencing the flags demo as testdata in |
|
the failure on cmake is from a different thing, which is annoying but not the same as the executable not found issue bazel has |
|
Just email reply, so hopefully this comes through: you're looking for the
binary "iree_base_internal_flags_demo", but the binary in Bazel is just
called "flags_demo". I think it will have the name "flags_demo" in cmake
too (though maybe we only add that alias for cc_binary). Related, why are
you using cc_test instead of cc_binary? It doesn't look to be a test on its
own. Just a demo binary
|
|
In cmake it's |
ab1eede to
8d1e5b8
Compare
|
I made it a cc_binary and it worked - looks like cc_test was missing an output name override so I fixed that anyway. |
8d1e5b8 to
3905e0f
Compare
|
Gave up on fixing spaces for now - the repro for the future is changing |
Future changes will also start to break out api.h.
3905e0f to
6696e64
Compare
fa99caf to
1cb2f7a
Compare
|
This seem to break Android. @benvanik is this expected?
|
|
ah this is from the cmake executable name change - the executables are now matching the bazel names, so here it would be |
|
Possible fix here #5660 - will kick off a benchmark run to test (though it concerns me that our |
Should just need the android correctness testing. No need to benchmark (and I don't think benchmarking should be running that test)
It just builds, doesn't run any tests, since testing currently requires a real android device. Ahmed is working on an emulator build. |
|
(ah yeah meant "buildkite") |
* 36522d9 Rotating instead of shifting to deal with overflow. (#5674) * e130e79 Merge pull request #5671 from ThomasRaoux/handle_vectorization * 011ffe0 Merge google -> main (#5663) * 6e16e38 Add vector transfer canonicalization patterns (#5664) * 95b3030 Add mobilenet_v3 to slim_vision_model_test.py (#5650) * 0c30c12 Fixing iree_cc_test android goo to use the proper executable name. (#5660) * cb54341 Adding initial executable benchmarking tool. (#5604) * 1de68ee Adding iree_task_executor_create_from_flags. (#5616) * db7f611 Merge pull request #5602 from google/benvanik-flags COPYBARA_INTEGRATE_REVIEW=#5673 from ThomasRaoux:main-to-google c08d5bd PiperOrigin-RevId: 371123718
* 36522d9 Rotating instead of shifting to deal with overflow. (#5674) * e130e79 Merge pull request #5671 from ThomasRaoux/handle_vectorization * 011ffe0 Merge google -> main (#5663) * 6e16e38 Add vector transfer canonicalization patterns (#5664) * 95b3030 Add mobilenet_v3 to slim_vision_model_test.py (#5650) * 0c30c12 Fixing iree_cc_test android goo to use the proper executable name. (#5660) * cb54341 Adding initial executable benchmarking tool. (#5604) * 1de68ee Adding iree_task_executor_create_from_flags. (#5616) * db7f611 Merge pull request #5602 from google/benvanik-flags PiperOrigin-RevId: 371123718
|
@benvanik Android benchmark as still crashing, did you expect such problem? |
|
I don't know what the benchmarks are doing, would have to look into that. Android buildkite passed though (https://buildkite.com/iree/iree-android-arm64-v8a/builds/4093) so it's probably something with the flags that are being generated for benchmarks. It'd be really nice if the benchmark script reported stdout/stderr instead of swallowing it - hard to tell what to fix :/ |
|
oh, they are still using |
|
I don't see anything in the repo using --function_inputs, so this must be something outside of the repo. I think @hanhanW will need to take a look. |
|
specifically, the flagfile being passed to android is: I don't know where that comes from, but it needs to be updated to have multiple |
|
Ha makes sense, I think those are on google drive. @antiagainst do you know? |
|
Yeah, it's hosted on Google Storage Bucket.. I can point you to the internal links. |
I'll update those to see if it solves it. |
iree-run-module changes flag mechanism in iree-org/iree#5602. Update the script accordingly. Change-Id: If2af370b06055055fc8e6eaec50fdc9b235e1eac GitOrigin-RevId: a12f7da14acb29d3ee2f317d9ca5704f589d9e07
iree-run-module changes flag mechanism in iree-org/iree#5602. Update the script accordingly. Change-Id: If2af370b06055055fc8e6eaec50fdc9b235e1eac

It does most of what we want without any C++ in 3 modes:
It also has the nifty property of a round-tripping mode that lets you
get all the current flag values and pipe them to a file to then load
back in a flagfile, which should make it easier to reproduce
flag-dependent configurations.
Likely lots of little tweaks remaining (there always are), but this is
enough to start replacing our existing usage of the abseil flags.
Callback flags allow us to support lists (multiple instances of a flag
on the command line) and actions, which aren't great in abseil flags.
This let us change
--function_inputs=into just repeated--function_input=lines which is much easier to deal with for humansand tools.
Future improvements will be to centralize flag handling for common
tool uses (like specifying entry point/function inputs/etc), adding flags
where previously they were avoided due to the abseil dep (various HAL and
task system stuff), and supporting flagfile when CLI is disabled.
This is now fully traced and we can see all flags parsed in traces:

Fixes #3814.