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

Read WorkgroupSize as whole vector from the spec constant value #59

Merged
merged 3 commits into from Sep 19, 2017

Conversation

dneto0
Copy link
Collaborator

@dneto0 dneto0 commented Sep 15, 2017

Change the implementation of the get_local_size implementation to
avoid some driver bugs:

  • One issue is trouble extracting individual elements. It's seems to
    work better to read the entire vector at once.
  • Another issue is that we have to extract directly from the spec
    composite value directly rather than from a variable initialized with
    that spec constant value.

@dneto0
Copy link
Collaborator Author

dneto0 commented Sep 15, 2017

Tested on release and debug builds, and in hardware.

@dneto0
Copy link
Collaborator Author

dneto0 commented Sep 15, 2017

LGTM

@dneto0
Copy link
Collaborator Author

dneto0 commented Sep 15, 2017

No, not so fast. Doesn't work in some scenarios. My HW case wasn't right.

@dneto0 dneto0 force-pushed the read-workgroup-size-as-vector branch 2 times, most recently from 324d1b8 to 4e1a86f Compare September 15, 2017 23:42
@dneto0 dneto0 changed the title Read WorkgroupSize as whole vector from the spec constant value WIP: Read WorkgroupSize as whole vector from the spec constant value Sep 15, 2017
@dneto0 dneto0 force-pushed the read-workgroup-size-as-vector branch 2 times, most recently from ff28a83 to 7f95b43 Compare September 17, 2017 17:21
@sheredom
Copy link

I did see this bug on NVIDIA, but after filing it their latest drivers have fixed the issue fwiw.

Change the implementation of the get_local_size implementation to
avoid some driver bugs:
- One issue is trouble extracting individual elements.  It's seems to
  work better to read the entire vector at once.
- Another issue is that we have to extract directly from the spec
  composite value directly rather than from a variable initialized with
  that spec constant value.
Take the bitwise-and of the WorkgroupSize spec constant value
*with itself* before extracting one of its components.

This works around a driver bug.

Added a TODO to remove this when we can.
@dneto0 dneto0 force-pushed the read-workgroup-size-as-vector branch from 7f95b43 to 964b936 Compare September 19, 2017 16:35
@dneto0
Copy link
Collaborator Author

dneto0 commented Sep 19, 2017

I did see this bug on NVIDIA, but after filing it their latest drivers have fixed the issue fwiw.

Yes, I had the same experience.

@dneto0
Copy link
Collaborator Author

dneto0 commented Sep 19, 2017

Rebased.
Tested in HW, and with Release and Debug builds.

I'd like to revisit this hack in the future.

@dneto0
Copy link
Collaborator Author

dneto0 commented Sep 19, 2017

LGTM

@dneto0 dneto0 merged commit 964b936 into google:master Sep 19, 2017
@dneto0 dneto0 changed the title WIP: Read WorkgroupSize as whole vector from the spec constant value Read WorkgroupSize as whole vector from the spec constant value Sep 19, 2017
@dneto0 dneto0 deleted the read-workgroup-size-as-vector branch October 3, 2017 03:48
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

Successfully merging this pull request may close these issues.

None yet

2 participants