Repository navigation
Remove Vulkan timeline semaphore emulation code. - #8018
Conversation
c302821 to
0e6664b
Compare
|
Pixel 4 will be problematic; given we have an outdated driver there. Recent Qualcomm phones does start to contain newer drivers that support timeline semaphores. I bought one and will evaluate how stable it is for benchmarking. It's still under shipping. Likely will take some extra weeks before we can finalize the choice of a phone and buy them for the lab. Trying to understand the timeline here. How soon are we expected to land this? |
Pessimistically: within a year? It's already been one year since we filed #4494 and started looking at this :P I put this PR together to see what would break, and it seems like we're actually pretty close to being able to make the flip. @benvanik is doing more real work with timeline semaphores now and being able to move the HAL the rest of the way to pure C with native timeline semaphore support assumed would definitely simplify things. |
|
It's hampering work on cleaning up semaphore and resource lifetime handling in the HAL - I've been putting off doing that for a year because of it and have run out of time that I can put it off. In the current form it may need a non-trivial rewrite that I'd much rather lose device support for devices we don't and won't ever ship on than keep kicking the can on getting things right :) |
|
We may be able to switch to the newer helpers I'm adding and maintain emulation for coverage but it wouldn't be with this code - so it's more of an issue of how to properly rewrite all of semaphore handling out from under the HAL while also maintaining this in a functioning state - that's been the mental block for me - so less about supporting emulation and more of me being unable to refactor things ;( |
|
Sorry - that was unclear - there's really two things here: So we can still need emulation but if we don't need it now then that's a good reason to yank it. |
|
Benchmarks completed on the Pixel 6 but failed (as expected I guess :P) on the Pixel 4: https://buildkite.com/iree/iree-benchmark/builds/1779. Looks like no comment gets posted with summary information if one phone fails. Worth commenting out the Pixel 4 benchmarks and running again to easily see if this affects performance? https://github.com/google/iree/blob/0e39d8edbff08f47c2dc3c0f6d26bc27d0313e8d/build_tools/buildkite/cmake/android/arm64-v8a/benchmark2.yml#L26 |
|
If it doesn't run on the pixel 6 then we have our answer as to whether we can get away without it :P |
|
Err, I mean the Pixel 6 completed all benchmark runs successfully, but the Pixel 4 failed. Since one failed, there was no comment posted with summary data. |
|
@ScottTodd: Certainly no need to wait another year! :D As said there are new devices having native support; just need to find the right one for benchmarking. (Galaxy S20 really bit us hard; don't want to have another episode of that. So I'm cautious.) @benvanik: What you said makes sense to me! I think we will need the emulation for supporting the broad range of phones given the notorious Android fragmentation issue. But that's quite far so makes sense to not anchor on it too much. The value of having it right now is being able to get benchmark numbers on Adreno GPUs. Though, I don't want to waste more of your time to handholding it given it's really close that we can find a phone with native support. I'm more from the perspective of understanding how soon this will happen and whether I can help to speed up by prioritizing certain things. (It depends on the logistics to order phones and get them shipped and set up, which is a bit uncontrollable by me. But I guess Google have the power of $$ to speed up a bit. Or at least I can order more than one and check them in parallel maybe. ;-P) Let's sync up via GVC tomorrow so we can align up. :) |
|
Agreed! I'm going to put some thought into a way to swap it out with the new stuff - this was more of a speculative "if we could avoid having that PR being 10k LOC (and instead be like 5k) that'd be nice" :P |
Abbreviated Benchmark Summary@ commit 4975c0443a5c3ae3e34671d47b1881d289089dce (vs. base b4967867b2eff4434c0f2ffb8d6f04e2bd1fe48b) Regressed Benchmarks 🚩
Improved Benchmarks 🎉
For more information: |
8c04eca to
ca43e16
Compare
This prepares landing #8018, which would require us to turn off GPU benchmarking on Pixel 4.
0ad8d39 to
4975c04
Compare
ScottTodd
left a comment
There was a problem hiding this comment.
Synced to head. This passes presubmits.
| - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz" | ||
| - "tar -xzvf tracy-capture-80f6a93d.tgz" | ||
| - "python3 build_tools/benchmarks/run_benchmarks_on_android.py --pin-cpu-freq --pin-gpu-freq --normal_benchmark_tool_dir=build-android/tools/ --traced_benchmark_tool_dir=build-android-trace/tools/ --trace_capture_tool=tracy-capture -o benchmark-results-pixel-4-${BUILDKITE_BUILD_NUMBER}.json --capture_tarball=trace-captures-pixel-4-${BUILDKITE_BUILD_NUMBER}.tgz --verbose build-host/" | ||
| - "python3 build_tools/benchmarks/run_benchmarks_on_android.py --pin-cpu-freq --pin-gpu-freq --normal_benchmark_tool_dir=build-android/tools/ --traced_benchmark_tool_dir=build-android-trace/tools/ --trace_capture_tool=tracy-capture -o benchmark-results-pixel-4-${BUILDKITE_BUILD_NUMBER}.json --capture_tarball=trace-captures-pixel-4-${BUILDKITE_BUILD_NUMBER}.tgz --driver_filter_regex='(?!vulkan).*' --verbose build-host/" |
There was a problem hiding this comment.
Note that this disables Vulkan benchmarks on Pixel 4
There was a problem hiding this comment.
However, we are now benchmarking on a Motorola Edge X30, which also has an Adreno GPU
Part of #4494 for migrating to Vulkan 1.2
Related to #2907 for enabling tests that were previously failing with emulation
This requires that all of our test configurations support timeline semaphores:
bazel_linux_x86-swiftshader_corefailure logs:/install-swiftshader/swiftshader/src/Vulkan/VkSemaphore.cpp:123 WARNING: nextInfo->sType = 1000207002-- blocked on rbe-toolchain image can't build latest swiftshader #7419cmake_linux_x86-swiftshadermostly passing logs: just semaphore_test timeouts in a test I tried to enable againcmake_linux_x86-turinglogs: successiree-android-arm64-v8alogs - Galaxy S10 passes tests, Galaxy S20 timed out (?),Pixel 4 fails them (can we switch to a newer Pixel phone for testing?)iree-benchmarklogs - Pixel 4 failed, Pixel 6 succeeded, no summary comment for easy analysis