Repository navigation
[c.parallel]: migrate transform to use jit templates instead of string based implementations - #7399
Merged
NaderAlAwar merged 8 commits intoJan 30, 2026
Conversation
…erators can have different storage types for input and output
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…void to ensure proper policy selection in device code
This comment has been minimized.
This comment has been minimized.
griwes
requested changes
Jan 29, 2026
Comment on lines
+295
to
+298
| if (ret.type == cccl_type_enum::CCCL_STORAGE || ((arguments.type == cccl_type_enum::CCCL_STORAGE) || ...)) | ||
| { | ||
| return cuda::std::nullopt; | ||
| } |
Contributor
There was a problem hiding this comment.
This is a bit of a regression; originally, @gevtushenko asked to also lower to cuda::std::foo for storage types, after giving them an operator foo, and that's handled within the if (entry->symbol) branch below. Can you see if that can be preserved here?
Contributor
Author
There was a problem hiding this comment.
Reverted the change, although now this test
cccl/c/parallel/test/test_transform.cpp
Line 351 in ce3629e
NEGATE
Contributor
Author
There was a problem hiding this comment.
We discussed this offline:
- The well known operators path with storage types will currently not work because there is no way for the C API to tell whether two storage types are the same or not. This is an issue because operators like
negaterequire the input and output types to be the same - It might be possible to use the upper bits of the type enum as a storage type discriminator, but this is beyond the scope of this PR
- We will open an issue to enhance the C API to tell whether two storage types are the same
For now I will keep my original change which bails out if a well known operator is used with storage types
…lAwar/cccl into transform-c-parallel-stateful-ops
with storage types to properly handle enum to string conversion
This comment has been minimized.
This comment has been minimized.
Contributor
🥳 CI Workflow Results🟩 Finished in 1h 19m: Pass: 100%/18 | Total: 4h 58m | Max: 46m 20s | Hits: 97%/1264See results here. |
griwes
approved these changes
Jan 30, 2026
This was referenced Jan 30, 2026
fbusato
pushed a commit
to fbusato/cccl
that referenced
this pull request
Feb 19, 2026
…g based implementations (NVIDIA#7399) * Plumb custom storage_t through jit templates to handle cases where operators can have different storage types for input and output * Set value_type of output iterator template to actual type instead of void to ensure proper policy selection in device code * Disable well known operations for storage types
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
closes #7387
Additionally, this PR makes changes to jit_templates to handle algorithms which could contain more than one type erased storage type. Prior to this, it was assumed that only one
storage_texists, but this change allows the caller to use atagged_argwhich contains a tag specifying the name of the storage type. This enables algorithms to define storage types with different sizes and alignments.Checklist