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

Couple of changes in WGSL layer #1231

Closed
wants to merge 16 commits into from
Closed

Couple of changes in WGSL layer #1231

wants to merge 16 commits into from

Conversation

unrenormalizable
Copy link
Contributor

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

The changes are issues identified during #1173

Changes

Fixes a couple of edge cases with sum/reduction WGSL layer.

Testing

"run-checks all"

TBD

  • squash the commits not related to this PR
  • macro for approx_eq

Copy link
Member

@louisfd louisfd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug regarding num_data needs to be fixed!

@@ -28,7 +28,11 @@ fn main(

if id_local == 0u {
var sum = {{ elem }}(0);
for (var i: u32 = 0u; i < WORKGROUP_SIZE; i++) {
var num_data = min(WORKGROUP_SIZE, arrayLength(&input) % WORKGROUP_SIZE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From myself on discord: "it has to depend on the invocation id, because now imagine you have workgroup_size=1000 ans input length is 2500. You will want 1000, 1000, 500 but the formula with min and modulo will give 500, 500, 500"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error in CI is likely to be caused by that

@antimora
Copy link
Collaborator

I assume this PR is blocked?

@antimora antimora added the blocked Should not be tackled right now label Feb 24, 2024
@unrenormalizable unrenormalizable closed this by deleting the head repository Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Should not be tackled right now
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants