Repository navigation
Improve buffer handling in WebGPU sample. - #14163
Merged
Merged
Conversation
* Some errors were not being fully propagated * Some code attempted to access handles without going through `iree_hal_buffer_allocated_buffer()`
ScottTodd
commented
Jun 22, 2023
Comment on lines
-761
to
+769
| .source_buffer = source_buffer, | ||
| .source_offset = data_offset, | ||
| .source_buffer = source_buffer_allocated, | ||
| .source_offset = source_offset, |
Member
Author
There was a problem hiding this comment.
Some of this async / loop-based readback code could be moved to a shared place with the rest of the C runtime code, where it would be easier to test.
benvanik
approved these changes
Jul 10, 2023
ScottTodd
added a commit
that referenced
this pull request
Aug 10, 2023
See #11054 (comment) - this `multiple_results.mlir` test program uses scalars, and #13711 changed the code path that scalar dispatches go down. This alternate code path does not appear to have the same SPIR-V -> WGSL compatibility patches as the tensor path, so we see compilation errors with messages like `entry point 'd0' references multiple variables that use the same resource binding`. We should fix that (and add tests so it doesn't regress again), but I want to keep webgpu runtime debugging work unblocked. This modified program exhibits the same runtime-related issue as reported on #13809 / #14163: * The first invocation incorrectly returns ``` 2xf32=2.23 2.45 2xf32=0 0 ``` * The second invocation correctly returns ``` 2xf32=1.23 1.45 2xf32=2.23 2.45 ```
nhasabni
pushed a commit
to plaidml/iree
that referenced
this pull request
Aug 24, 2023
Progress on iree-org#13809 * Some errors were not being fully propagated * Some code attempted to access handles without going through `iree_hal_buffer_allocated_buffer()` __This code still has bugs:__ * multiple_results.mlir: `absf(-1.23, -4.56)` returns `(4.56, 0)` at first, then `(1.23, 4.56)` on future calls with the same loaded program state * mobilebert, posenet, mobilessd: no errors, correct number of outputs, incorrect numerical results (way off `llvm-cpu`/`local-task`, stable across runs)
nhasabni
pushed a commit
to plaidml/iree
that referenced
this pull request
Aug 24, 2023
See iree-org#11054 (comment) - this `multiple_results.mlir` test program uses scalars, and iree-org#13711 changed the code path that scalar dispatches go down. This alternate code path does not appear to have the same SPIR-V -> WGSL compatibility patches as the tensor path, so we see compilation errors with messages like `entry point 'd0' references multiple variables that use the same resource binding`. We should fix that (and add tests so it doesn't regress again), but I want to keep webgpu runtime debugging work unblocked. This modified program exhibits the same runtime-related issue as reported on iree-org#13809 / iree-org#14163: * The first invocation incorrectly returns ``` 2xf32=2.23 2.45 2xf32=0 0 ``` * The second invocation correctly returns ``` 2xf32=1.23 1.45 2xf32=2.23 2.45 ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Progress on #13809
iree_hal_buffer_allocated_buffer()This code still has bugs:
absf(-1.23, -4.56)returns(4.56, 0)at first, then(1.23, 4.56)on future calls with the same loaded program statellvm-cpu/local-task, stable across runs)