Skip to content

Enable alias-mutable-bindings setting in FuseDispatchBindings. - #13323

Closed
ScottTodd wants to merge 1 commit into
iree-org:mainfrom
ScottTodd:alias-mutable-bindings
Closed

ScottTodd wants to merge 1 commit into
iree-org:mainfrom
ScottTodd:alias-mutable-bindings

Conversation

@ScottTodd

Copy link
Copy Markdown
Member

See #7716 for history here.

This setting appears to be necessary for WebGPU at least (see #11499 (comment) and this discussion on Discord).

@ScottTodd ScottTodd added buildkite:benchmark-android benchmarks:cuda Run default CUDA benchmarks benchmarks:x86_64 Run default x86_64 benchmarks labels Apr 27, 2023
@github-actions

Copy link
Copy Markdown

Abbreviated Benchmark Summary

@ commit 0ccc70a637a525269bcd2465851e0d76e2a2ebbc (vs. base 4208feeb0d8c828f9d020fbc0fadb91a460e198c)

Regressed Latencies 🚩

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
Unet2dPT(linalg) [cuda-sm\_80-linux\_gnu-cuda][default-flags] cuda(none)[full-inference,default-flags] with zeros @ a2-highgpu-1g[gpu] 7144.717 (vs. 764.029, 835.14%↑) 7144.468 1.540
EfficientNetB7PT(linalg) [cuda-sm\_80-linux\_gnu-cuda][default-flags] cuda(none)[full-inference,default-flags] with zeros @ a2-highgpu-1g[gpu] 154.538 (vs. 85.780, 80.16%↑) 154.189 1.065

No improved or regressed compilation metrics 🏖️

For more information:

Source Workflow Run

@benvanik

Copy link
Copy Markdown
Collaborator

well, cuda codegen still has aliasing issues, apparently :P

@iree-github-actions-bot

iree-github-actions-bot commented Apr 27, 2023 •

Copy link
Copy Markdown
Contributor

Abbreviated Android Benchmark Summary

@ commit 7941e323465b038884ab9fc646ec7931b7cad33b (vs. base f0fac24c6037984b9d4b76f14eac47be897770ed)

Regressed Latencies 🚩

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileNetV2 [fp32,imagenet] (TFLite) big-core,full-inference,default-flags with IREE-LLVM-CPU-Sync @ Pixel-4 (CPU-ARMv8.2-A) 37.430 (vs. 31.058, 20.52%↑) 37.424 0.046
EfficientNet [int8] (TFLite) full-inference,default-flags with IREE-Vulkan @ Pixel-6-Pro (GPU-Mali-G78) 15.356 (vs. 13.129, 16.96%↑) 15.334 0.140

Improved Latencies 🎉

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileBertSquad [fp32] (TFLite) full-inference,experimental-flags with IREE-Vulkan @ XT2201-2 (GPU-Adreno-730) 231.090 (vs. 277.166, 16.62%↓) 237.268 13.407
MobileBertSquad [fp32] (TFLite) full-inference,default-flags with IREE-Vulkan @ XT2201-2 (GPU-Adreno-730) 233.945 (vs. 277.917, 15.82%↓) 241.584 12.504
DeepLabV3 [fp32] (TFLite) full-inference,experimental-flags with IREE-Vulkan @ XT2201-2 (GPU-Adreno-730) 36.718 (vs. 41.914, 12.40%↓) 36.953 0.937

[Top 3 out of 7 results showed]

For more information:

@ScottTodd

Copy link
Copy Markdown
Member Author

Android Vulkan fp32 benchmark improvements could be legit? Seems outside the standard noise range 🤔

ScottTodd added a commit that referenced this pull request Jun 6, 2023
This pass option is currently necessary to run some WebGPU programs
correctly, so this adds a compiler flag to set it. Without the option, I
see errors like
```
Writable storage buffer binding aliasing found between [BindGroup] set at bind group index 0, binding index 0, and [BindGroup] set at bind group index 0, binding index 2, with overlapping ranges (offset: 0, size: 256) and (offset: 0, size: 256) in [Buffer].
 - While encoding [ComputePassEncoder].DispatchWorkgroups(1, 5, 1).
 
[Invalid CommandBuffer] is invalid.
    at ValidateObject (../../third_party/dawn/src/dawn/native/Device.cpp:689)
    at ValidateSubmit (../../third_party/dawn/src/dawn/native/Queue.cpp:442)
```

We can't enable the option by default yet, since it causes some severe
performance regressions on CUDA:
#13323. The tests also have a few
suspicious TODOs, but I want to unblock correctness testing on WebGPU
before digging in deeper.
@ScottTodd ScottTodd closed this Jun 14, 2023
@ScottTodd
ScottTodd deleted the alias-mutable-bindings branch June 14, 2023 23:30
NatashaKnk pushed a commit to NatashaKnk/iree that referenced this pull request Jul 6, 2023
This pass option is currently necessary to run some WebGPU programs
correctly, so this adds a compiler flag to set it. Without the option, I
see errors like
```
Writable storage buffer binding aliasing found between [BindGroup] set at bind group index 0, binding index 0, and [BindGroup] set at bind group index 0, binding index 2, with overlapping ranges (offset: 0, size: 256) and (offset: 0, size: 256) in [Buffer].
 - While encoding [ComputePassEncoder].DispatchWorkgroups(1, 5, 1).
 
[Invalid CommandBuffer] is invalid.
    at ValidateObject (../../third_party/dawn/src/dawn/native/Device.cpp:689)
    at ValidateSubmit (../../third_party/dawn/src/dawn/native/Queue.cpp:442)
```

We can't enable the option by default yet, since it causes some severe
performance regressions on CUDA:
iree-org#13323. The tests also have a few
suspicious TODOs, but I want to unblock correctness testing on WebGPU
before digging in deeper.
nhasabni pushed a commit to plaidml/iree that referenced this pull request Aug 24, 2023
This pass option is currently necessary to run some WebGPU programs
correctly, so this adds a compiler flag to set it. Without the option, I
see errors like
```
Writable storage buffer binding aliasing found between [BindGroup] set at bind group index 0, binding index 0, and [BindGroup] set at bind group index 0, binding index 2, with overlapping ranges (offset: 0, size: 256) and (offset: 0, size: 256) in [Buffer].
 - While encoding [ComputePassEncoder].DispatchWorkgroups(1, 5, 1).
 
[Invalid CommandBuffer] is invalid.
    at ValidateObject (../../third_party/dawn/src/dawn/native/Device.cpp:689)
    at ValidateSubmit (../../third_party/dawn/src/dawn/native/Queue.cpp:442)
```

We can't enable the option by default yet, since it causes some severe
performance regressions on CUDA:
iree-org#13323. The tests also have a few
suspicious TODOs, but I want to unblock correctness testing on WebGPU
before digging in deeper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmarks:cuda Run default CUDA benchmarks benchmarks:x86_64 Run default x86_64 benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants