You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Format is run_number commit_hash latency. So unsurprisingly we see a big bump after each LLVM integrate, but it usually recovers on the next commit. That's consistent with invalidating a big chunk of the cache and having to rebuild, but then having high cache hit rates for subsequent runs (which is what I see from spot-checking the logs). This time, it never recovered :-(
It's something deeper than just making things more likely to change commit to commit though. 63d4693 took forever to run this. There's no reasonable reason for that to invalidate any caching of TF deps.
WARNING: /home/runner/.cache/bazel/_bazel_runner/08e7c041e5c88d3a6ab680b92ad23ca3/external/org_tensorflow/tensorflow/core/common_runtime/BUILD:891:11: in hdrs attribute of cc_library rule @org_tensorflow//tensorflow/core/common_runtime:graph_constructor: Artifact 'external/org_tensorflow/tensorflow/core/common_runtime/shape_refiner.h' is duplicated (through '@org_tensorflow//tensorflow/core/common_runtime:core_cpu_lib_headers' and '@org_tensorflow//tensorflow/core/common_runtime:shape_refiner.h')
Now that seems like the sort of thing that would cause problems. Of course it isn't easy to spot because of all the warning spew. I think that means that the above MHLO commit is not the culprit
That seems unexpected. I thought --expunge shouldn't touch the disk cache. But if the issue is things being uncacheable, I would expect the disk cache hits after the normal clean and shutdown to go away as well.
Activity
GMNGeoffrey commentedon Aug 30, 2022
Much fiddling with the GitHub api and
jqlater, I've identified that there was a dramatic slowdown with an update to TF/LLVM/MHLO in #10180GMNGeoffrey commentedon Aug 30, 2022
Here's the full set of results. This is the latency in seconds of each
build_tf_integrationsjob that completed successfully: https://gist.github.com/GMNGeoffrey/5df808b5fabcc38a15d3b5e31cb5985aFormat is
run_number commit_hash latency. So unsurprisingly we see a big bump after each LLVM integrate, but it usually recovers on the next commit. That's consistent with invalidating a big chunk of the cache and having to rebuild, but then having high cache hit rates for subsequent runs (which is what I see from spot-checking the logs). This time, it never recovered :-(GMNGeoffrey commentedon Aug 30, 2022
It looks likely that this commit (or rather its upstream counterpart) is the culprit: https://github.com/iree-org/iree-mhlo-fork/commit/257add0e3cc79dea0ff57e0e11dc847801ab4cac
GMNGeoffrey commentedon Aug 30, 2022
It's something deeper than just making things more likely to change commit to commit though. 63d4693 took forever to run this. There's no reasonable reason for that to invalidate any caching of TF deps.
GMNGeoffrey commentedon Aug 30, 2022
Ah I see these warnings in the logs:
Now that seems like the sort of thing that would cause problems. Of course it isn't easy to spot because of all the warning spew. I think that means that the above MHLO commit is not the culprit
GMNGeoffrey commentedon Aug 30, 2022
No, that's in the not-slow logs too :-(
GMNGeoffrey commentedon Aug 30, 2022
Diffed the warnings between a slow and fast run and they're all the same. I return to being confused
GMNGeoffrey commentedon Aug 30, 2022
I reverted IREE back to the state before that commit and confirmed that the TF build takes a reasonable amount of time (6 minutes) and is all cache hits: https://github.com/iree-org/iree/runs/8102048102
I think that basically rules out a change in infra having caused the problem and indeed pins the blame on our submodule update.
I'm trying to figure out if I can repro this locally. At HEAD(ish)
$ bazel build iree_tf_compiler:all [...] INFO: Elapsed time: 762.116s, Critical Path: 490.54s INFO: 10302 processes: 2 disk cache hit, 3294 internal, 7006 linux-sandbox. INFO: Build completed successfully, 10302 total actions $ bazel clean && bazel shutdown $ bazel build iree_tf_compiler:all [...] INFO: Elapsed time: 35.230s, Critical Path: 18.02s INFO: 10302 processes: 7008 disk cache hit, 3294 internal INFO: Build completed successfully, 10302 total actions $ bazel clean --expunge $ bazel build iree_tf_compiler:all [...] INFO: Elapsed time: 880.873s, Critical Path: 516.72s INFO: 10302 processes: 14 disk cache hit, 3294 internal, 6994 linux-sandbox. INFO: Build completed successfully, 10302 total actionsThat seems unexpected. I thought
--expungeshouldn't touch the disk cache. But if the issue is things being uncacheable, I would expect the disk cache hits after the normal clean and shutdown to go away as well.Pass env variable instructing CI to write Bazel cache (#10248)
GMNGeoffrey commentedon Aug 31, 2022
Confirmed #10248 fixed this. The first run post submit was slow, as expected, but a re-run finished in 5 minutes: https://github.com/iree-org/iree/runs/8104429878. See that PR for a lengthy explanation of what happened, but the gist is that it was an infra issue and debugging caches is hard