Skip to content
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

Conformance testing webgpu.h #253

Open
kainino0x opened this issue Dec 21, 2023 · 2 comments
Open

Conformance testing webgpu.h #253

kainino0x opened this issue Dec 21, 2023 · 2 comments
Labels
non-breaking Does not require a breaking change (that would block V1.0)

Comments

@kainino0x
Copy link
Collaborator

Since we want webgpu.h implementations to be interoperable, we will need some kind of conformance testing.

@kainino0x kainino0x added the non-breaking Does not require a breaking change (that would block V1.0) label Dec 21, 2023
@kainino0x
Copy link
Collaborator Author

Dec 21 meeting

  • CF: Any thought to how to make sure implementations are actually compatible?
  • KN: Same problem with Emscripten bindings which are basically untested. We want to run Dawn tests against Emscripten, and once we do that hopefully they can also be built against wgpu-native
  • KN: CTS->Node->webgpu_cpp.h->webgpu.h->Dawn could also be retargeted to wgpu-native. Our node bindings have some gaps though.
    • RM: Can that test Emscripten?
    • KN: Probably not
  • CF: Compared with retargeting Dawn’s tests, would probably be a little less work to retarget wgpu’s tests. Not likely to happen anytime soon, but might be nice for wgpu-native
  • (discussion of monorepos and bidirectional sync between moz-central/wgpu or chromium/dawn)

@eliemichel
Copy link
Collaborator

eliemichel commented Jan 3, 2024

FWIW the main way I use to detect mismatches between implementations is to use this webgpu.cmake file to include WebGPU to my project in a way that can easily switch between backends (more info):

# Configure a 1st build that uses wgpu-native in the folder 'build-wgpu'
cmake -B build-wgpu -DWEBGPU_BACKEND=WGPU
# Configure a 2nd build that uses wgpu-native in the folder 'build-dawn'
cmake -B build-dawn -DWEBGPU_BACKEND=DAWN
# Then build both projects and compare!

Note that the file webgpu.cmake from the main branch of my distribution repo is frozen to the latest version of the backends that uses the guide. There is a dev branch that is more up to date but also frozen, I could add a latest branch that always follows the latest version if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-breaking Does not require a breaking change (that would block V1.0)
Projects
None yet
Development

No branches or pull requests

2 participants