huggingface / huggingface/ratchet

Reorder bindings

Open
#141 3 comments 0 reactions 0 assignees View on GitHub
performance
Dominant language
Rust
Stars
771
Forks
44
Avg merge
40m
Merged PRs (30d)
1

Description

```wgsl
@group(0) @binding(0)
var X: array;

@group(0) @binding(1)
var W: array;

@group(0) @binding(2)
var B: array;

@group(0) @binding(3)
var Y: array;
```

Our kernel preamble currently looks like the following, seems fine right? WRONG!
In reality, you want your bindings ordered in ascending order of change.

What does that mean?
Your `read_write` bindgroup should be `@group(0) @binding(0)`, because every operation has a single output.
Simple, but boring change to make throughout the codebase.

Contributor guide

Open the contributing guide

Research direction

Start by locating the kernel preambles referenced in the issue and inspect each binding's access mode. Reorder every bind group so read_write output bindings use the lowest binding number, then verify that the ordering is consistent throughout the codebase.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
machine-learning
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.