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

Add pyopencl-like GenericScanKernel #188

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

adityapb
Copy link

I've tried to keep the kernel source code similar to the scan kernel in pyopencl using pycuda._cluda. I am listing out the differences between the two:

  1. Added a RESTRICT macro to _cluda (will make a corresponding PR to pyopencl)
  2. Removed the is_gpu variable and the extra code that came along with it for the CPU
  3. This line had to be changed slightly

Apart from this I've added some helper functions in pycuda.tools, added tests for int64 dtype and a test for segmented scans that are exactly similar to those in pyopencl and updated the documentation.

@inducer
Copy link
Owner

inducer commented Oct 7, 2018

Transplanted here for CI: https://gitlab.tiker.net/inducer/pycuda/merge_requests/11

@inducer
Copy link
Owner

inducer commented Oct 7, 2018

  • You (I assume inadvertently) changed the bpl-subset submodule back to an old version. (see the CI failure)
  • I may not have been fully clear on what I was looking for in GenericScanKernel for pycuda #187, but I am not interested in maintaining two versions of GenericScanKernel. i would like for both versions to be letter-for-letter the same, so that I can copy them back and forth between pycuda and pyopencl after each change.

@adityapb
Copy link
Author

adityapb commented Oct 9, 2018

  • Yes I did, accidentally. Sorry about that.
  • Ah! I think I misunderstood earlier. But just to be clear, you want not only the SCAN_INTERVALS_SOURCE and the UPDATE_SOURCE to be identical but the entire GenericScanKernel class, right?

@inducer
Copy link
Owner

inducer commented Oct 9, 2018

Ah! I think I misunderstood earlier. But just to be clear, you want not only the SCAN_INTERVALS_SOURCE and the UPDATE_SOURCE to be identical but the entire GenericScanKernel class, right?

Ideally, I'd like for the whole file to be identical, so that for each change I can just drop a pull request into each repo with the same file, wait for CI to pass, and move on. I don't know if that's feasible though. If not, I could be OK with the identical bits (maybe the CL/CUDA source and a base class) living in a seperate file.

Base automatically changed from master to main March 8, 2021 05:16
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