Repository navigation
Roll Emdawnwebgpu and repoint USE_WEBGPU tests at Emdawnwebgpu - #25397
Conversation
In preparation to remove USE_WEBGPU entirely (emscripten-core#24265). Ideally these tests would live in Dawn, but we don't have a way to automate tests in the browser yet, so for the moment we'll keep them in Emscripten. DO NOT SUBMIT: Needs Emdawnwebgpu roll in order to pass
|
@lokokung PTAL |
a88588a to
ffb124d
Compare
ffb124d to
d12517b
Compare
3b2d73d to
4c7bf8a
Compare
4c7bf8a to
4f93d5f
Compare
webgpu.cpp uses C++ library functions, so it needs to be linked with C++ support, otherwise it gets a long list of missing C++ STL symbol errors. Make this an explicit error so people know what to do if they get this error (because they're using -sSTRICT or -sNO_DEFAULT_TO_CXX). Initial discussion: emscripten-core/emscripten#25397 (comment) Bug: none Change-Id: I99b766298f47b946e0ba49eacad04fe8b427f6de Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/264434 Reviewed-by: Loko Kung <[email protected]> Commit-Queue: Kai Ninomiya <[email protected]>
…sn't release until after the callback)
| '-Wno-error=deprecated', | ||
| '-sINCLUDE_FULL_LIBRARY', | ||
| '-sUSE_WEBGPU', | ||
| '--use-port=emdawnwebgpu', |
There was a problem hiding this comment.
Do we have any remaining tests for -sUSE_WEBGPU?
There was a problem hiding this comment.
No, but I'm planning to remove it immediately after this (#25398).
| 'dylink': (['-sMAIN_MODULE'],), | ||
| }) | ||
| def test_webgpu_compiletest(self, args): | ||
| self.run_process([EMXX, test_file('webgpu_jsvalstore.cpp'), '-Wno-error=deprecated', '-sUSE_WEBGPU', '-sASYNCIFY'] + args) |
There was a problem hiding this comment.
Why is this test no longer useful?
There was a problem hiding this comment.
The whole jsvalstore thing has been removed in Emdawnwebgpu. We have another mechanism but it would need entirely new tests.
| self.run_process([EMXX, test_file('test_emdawnwebgpu_link_test.cpp'), '--use-port=emdawnwebgpu', '-sASYNCIFY'] + args) | ||
| if config.FROZEN_CACHE: | ||
| # TODO(crbug.com/446944885): Make Emdawnwebgpu work with FROZEN_CACHE if possible. | ||
| self.skipTest("test doesn't work with frozen cache") |
There was a problem hiding this comment.
Why is this skipTest needed now but not before this PR?
There was a problem hiding this comment.
I think it's because previously the cache was pre-populated with -sUSE_WEBGPU but we don't prepopulate it with --use-port=emdawnwebgpu (which would have to be done with several different flags too).
I can try to pre-populate the cache with the appropriate Emdawnwebgpu objects if you think that's appropriate.
There was a problem hiding this comment.
Lines 103 to 104 in 3b22cd6
I think it comes from this? I don't think it'll be that easy to add Emdawnwebgpu here though.
There was a problem hiding this comment.
Oh, it would be added via this
Line 139 in 3b22cd6
There was a problem hiding this comment.
But the old code and the new code here both use --use-port=emdawnwebgpu.
There was a problem hiding this comment.
Oh, sorry, I missed which test this was. I actually have no idea. If I remove emdawnwebgpu from my local cache and run the old test (on main), it still fails with FROZEN_CACHE is set, but cache file is missing.
Could the @flaky be suppressing it?
There was a problem hiding this comment.
Oh, CI has an explicit separate Embuilder step. Let me figure out how to test that locally and then see where I need to skip tests.
There was a problem hiding this comment.
Okay, I figured out which configurations don't get precached and skipped only those.
There was a problem hiding this comment.
... Although I did not figure out exactly why it was passing before and isn't now. @also_with_wasm64 isn't newly-added.
LGTM with the test changes - looks like they're effectively refactoring callbacks to lambdas. |
Mainly yes. But also taking advantage of keepalives to let a bunch of async stuff finish before the test completes (without using asyncify). |
2b69827 to
8ebf5ef
Compare
|
@sbc100 bump! |
|
I guess I should have rebased and rerun CI before landing... something broke on main. Seems to be cache related again. Looking into it. |
|
Yes, it looks kind of odd yes. I see |
|
Good catch. Unfortunately no luck so far reproducing this locally on Windows. I'm not entirely clear from the logs if there's an interaction between different tests or not. |
|
Ah, just realized this is probably a flake. I think the first failure I saw on #25398 was the same, but after rerunning it, I got something else: and this test passed. |
|
That assertions looks very odd. Line 766 of test_sanity.py reads |
|
Ohh wait, this flake was the existing one from #25343. I forgot about that and didn't read it closely so I didn't realize it was doing the same thing. |
|
The |
|
The next commit on main (0b127ff) passed CI. (I also retriggered CI on my commit so it might show as passing too once it's done) |
…ipten-core#25397) In preparation to remove USE_WEBGPU entirely (emscripten-core#24265). Ideally these tests would live in Dawn, but we don't have a way to automate tests in the browser yet, so for the moment we'll keep them in Emscripten. Emdawnwebgpu roll includes: - `` bb3dc45 [emscripten] Use Emscripten `diagnostics.error` instead of `raise` `` - ``a3650c0 [emscripten] Error on LINK_AS_CXX=0 in emdawnwebgpu.port.py``
In preparation to remove USE_WEBGPU entirely (#24265). Ideally these tests would live in Dawn, but we don't have a way to automate tests in the browser yet, so for the moment we'll keep them in Emscripten.
Emdawnwebgpu roll includes:
bb3dc45 [emscripten] Use Emscripten `diagnostics.error` instead of `raise`a3650c0 [emscripten] Error on LINK_AS_CXX=0 in emdawnwebgpu.port.py