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

wgpu: Validation Error Due to Buffer Binding Size Mismatch #2775

Open
discordance opened this issue Feb 4, 2025 · 4 comments
Open

wgpu: Validation Error Due to Buffer Binding Size Mismatch #2775

discordance opened this issue Feb 4, 2025 · 4 comments

Comments

@discordance
Copy link

discordance commented Feb 4, 2025

Description

When running this Example with the latest commit of burn on master, a wgpu validation error is raised during the backward pass:

wgpu error: Validation Error

Caused by:
    In ComputePass::end
    In a dispatch command, indirect:false
    Buffer is bound with size 4 where the shader expects 8 in group[0] compact index 0

It appears that the error is caused by an updated minimum alignment requirement in wgpu according to @wingertge

Forward pass behave as expected.

You can reproduce the bug cloning This simple example, using the wgpu branch.

@discordance discordance changed the title # WGPU: Validation Error Due to Buffer Binding Size Mismatch WGPU: Validation Error Due to Buffer Binding Size Mismatch Feb 4, 2025
@discordance discordance changed the title WGPU: Validation Error Due to Buffer Binding Size Mismatch wgpu: Validation Error Due to Buffer Binding Size Mismatch Feb 4, 2025
@laggui
Copy link
Member

laggui commented Feb 4, 2025

As mentioned on discord, this is actually a side effect of the issue #2776.

Let me know if you still see the issue, otherwise will close when the repeat dim backward PR is merged 🙂

@discordance
Copy link
Author

Okay, testing here, I have a new one now:

thread 'main' panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-24.0.1/src/backend/wgpu_core.rs:1079:26:
wgpu error: Validation Error

Caused by:
In Device::create_bind_group_layout
Too many bindings of type StorageBuffers in Stage ShaderStages(COMPUTE), limit is 31, count was 32. Check the limit max_storage_buffers_per_shader_stage passed to Adapter::request_device

@laggui
Copy link
Member

laggui commented Feb 7, 2025

Linking #1970

Guess there might still be an issue with fusion. If you try without the feature (enabled by default), do you still hit the limit?

@discordance
Copy link
Author

It works when fusion is disabled
when fusion is enabled, repeat operation makes it crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants