-
Notifications
You must be signed in to change notification settings - Fork 212
[vello_sparse_tests] Add vello_cpu scalar test coverage on WASM #1065
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
Conversation
|
|
||
| fn rgb_img_10x10() -> Arc<Pixmap> { | ||
| load_image("rgb_image_10x10") | ||
| load_image!("rgb_image_10x10") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI there will probably be conflicts with the image rendering PR for vello_hybrid, but I guess not much we can do for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great callout! @grebmeg would you like me to hold this PR back until images has landed, or are you ok with the rebase and replacing load_image with load_image!? (I think it should be a syntactic only change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndrewJakubowicz No need to wait on me — feel free to go ahead and get this landed.
|
Ooops, this PR has revealed that there is a bug in fearless_simd in the WASM architecture. fearless_simd on WASM should only add SIMD instructions if the target is compiled with the |
|
After further investigation, this PR is safe to land. The SIMD in the WASM binary would not be encountered during the tests, and is instead instructions included due to |
Context
This is a test only PR - adding additional test coverage for scalar vello_cpu tests running on the browser.
Before this PR:
After this PR:
This can also be seen in CI of this PR.
Changes
load_imagehas been moved intoutilsand has become a macro. This is required such that WASM can embed the image assets into the compiled WASM binary (as wasm doesn't have access to filesystem).vello_testproc macro, which now generates two additional tests, a u8 and f32 scalar wasm cpu test.Test plan
This whole PR is the test.