-
Notifications
You must be signed in to change notification settings - Fork 18k
x/build/env: Add builder for GOOS=wasip1 GOARCH=wasm #59150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @golang/release |
Change https://go.dev/cl/479121 mentions this issue: |
Change https://go.dev/cl/479118 mentions this issue: |
This builder installs wasmtime, a Wasm runtime with WASI support. For golang/go#59150 Change-Id: I7d1db6c9f5ec2b4257e3961b552f3de0bb7ed049 Reviewed-on: https://go-review.googlesource.com/c/build/+/479121 Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com>
Built the images and deployed the coordinator. Seems to be failing as expected. |
In the past few days I've been noticing that this builder is consistently a straggler; is there any way to make it faster? |
Do the builders allow any caching of artifacts? Wazero is instructed to put it's native code in $TMP, so if we have a way to persist folders between runs we should get a speedup. |
We may be able to support this kind of caching in the near(-ish) future, but could you clarify why you think it would help here? Alternatively, would the wasmtime builder be faster (once it's fully on)? This is also worth exploring (after all our goal here is to test the wasip1 target, not the specific wasm VM). As well as some general profiling to see if the bot can be made faster. Finally, we may consider whether this builder is needed in trybots at all (given that the wasm/js builder already runs), if the performance issues cannot be sufficiently addressed. |
I haven't tested this, but I assume most of the time consumed is in the native-code compilation step that wazero performs as part of its execution of the wasm. These artifacts are cached and could be reused between runs, so that subsequent test runs only need to rebuild those that have changed. It is possible to run wazero in an interpreted mode, but in our testing that was significantly slower. Wasmtime may be faster, I haven't spent any time comparing the runtime of the two yet, but it too will probably be spending most of the time in the native-code compilation step part of the execution, unless we introduce caching.
I understand if we'd want to turn it off because it's too slow, but I don't know that wasm/js alone will be able to give us confidence that the wasip1 port isn't broken. I don't know enough about the builder system to say yet, but it may be enough to only run these on tip, is that what you mean? As long as we get notified about it breaking, that should be sufficient. |
But if the compiler itself changes in a CL, you can't reuse its JIT products from previous runs. Similarly with stdlib changes which may affect any test. So I'm not 100% how much this can save.
@dmitshur pointed out that in https://go.dev/cl/498616 the wasmtime bot finished much quicker than wazero, and in fact wasn't the long pole in our trybots any more. If we can have a wasip1 trybot that's not the long pole, it's fine to keep it around if you feel it covers additional stuff that js/wasm does not. |
What a timely comment to be making as we just had the wasmtime runner pass all the standard library tests. I would be happy to make the switch to wasmtime for all CLs as it should find any obvious breakages, but note that symlink tests are disabled on wasmtime because it doesn't really work with the standard library test assumptions, so we'll still want to pay attention to the wazero runner. |
Indeed, the timing is fortunate :) Yes, the wazero builder can remain on the post-submits of course, and run on tip, but for trybots that run on every CL and affect our compile-edit-test loop it would be nice to switch to the faster configuration. |
Change https://go.dev/cl/498675 mentions this issue: |
The wasmtime WASI runtime completes the standard library tests faster than wazero, which makes it suitable for running on every CL. Wazero will continue to be run against tip. Querying the builders database shows the following statistics for builder runtime (execution in seconds): wasip1-wasm-wasmtime: 1234.808416431 852.305792789 1252.596007033 wasip1-wasm-wazero: 2421.876266138 2419.399971708 2439.044948166 For golang/go#59150. Change-Id: I68c7d454109e53e860a020aabd489c6fb97121dc Reviewed-on: https://go-review.googlesource.com/c/build/+/498675 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Reviewed-by: Eli Bendersky <eliben@google.com>
#58141 adds the new GOOS=wasip1 GOARCH=wasm port. This new port will require a new builder that can run the standard library tests.
I intend to submit a CL to add this.
The text was updated successfully, but these errors were encountered: