Skip to content

Cooperative vector API #141

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

Merged
merged 4 commits into from
May 30, 2025
Merged

Cooperative vector API #141

merged 4 commits into from
May 30, 2025

Conversation

wjakob
Copy link
Member

@wjakob wjakob commented Apr 18, 2025

This PR adds cooperative vector code generation support to Dr.Jit-Core. The main documentation and test suite of this feature is in the Dr.Jit parent project.

@wjakob
Copy link
Member Author

wjakob commented Apr 18, 2025

@merlinND I forgot to create a separate PR for this part, done now.

@wjakob wjakob force-pushed the coopvec branch 2 times, most recently from 0122307 to 9532b48 Compare April 21, 2025 22:55
Copy link
Member

@merlinND merlinND left a comment

Choose a reason for hiding this comment

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

Review part 1 (missing llvm/cuda_coop_vec.cpp).

Copy link
Member

@merlinND merlinND left a comment

Choose a reason for hiding this comment

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

I had a look at the two remaining files in this PR. I don't know much about LLVM IR so I mostly reviewed the CUDA backend.

It's really nice how a few helpers make the long intrinsic calls in cuda_coop_vec.cpp quite compact and readable, despite all the different ops and cases.

wjakob added 2 commits May 30, 2025 23:00
Dr.Jit can elide scatter operations when their result can no longer be
referenced by any other operations. The logic to do so, and when
reference count decreases are needed, was dispersed throughout
``eval.cpp``. This commit simplifies the underlying code.
Dr.Jit previously chose the lowest possible PTX version for each compute
capability, but this ended up being too restrictive. It now ships a
table containing a full driver version -> PTX version mapping and then
searches it for the highest possible PTX version.
Wenzel Jakob added 2 commits May 30, 2025 23:27
This commit adds cooperative vector code generation support to
Dr.Jit-Core. The main documentation and test suite of this feature is in
the Dr.Jit parent project.
- Use continuation callables when compiling OptiX programs that use
  the cooperative vector extension. This yields slightly better
  performance.

- When the program uses wide (>64) CoopVec networks, set a high
  register target to avoid spills.
@wjakob wjakob merged commit b402831 into master May 30, 2025
5 checks passed
@wjakob wjakob deleted the coopvec branch May 30, 2025 14:44
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.

2 participants