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

[FEA]: Abstract build step in cccl.c.parallel #2525

Open
1 task done
gevtushenko opened this issue Oct 9, 2024 · 1 comment · May be fixed by #3439
Open
1 task done

[FEA]: Abstract build step in cccl.c.parallel #2525

gevtushenko opened this issue Oct 9, 2024 · 1 comment · May be fixed by #3439
Assignees
Labels
2.8.0 target for 2.8.0 release feature request New feature or request.

Comments

@gevtushenko
Copy link
Collaborator

Is this a duplicate?

Area

General CCCL

Is your feature request related to a problem? Please describe.

Porting algorithm to cccl.c.parallel involves a lot of boilerplate code in build step. Depending on if an iterator has a state or not, we have to generate a string with C++ wrappers. Same applies to operators. We were able to abstract this in cuda.cooperative, so it should be possible to abstract build step in cccl.c.parallel as well:

template = Algorithm('WarpMergeSort',
'Sort',
'warp_merge_sort',
['cub/warp/warp_merge_sort.cuh'],
[TemplateParameter('KeyT'),
TemplateParameter('ITEMS_PER_THREAD'),
TemplateParameter('VIRTUAL_WARP_THREADS')],
[[Pointer(numba.uint8),
DependentArray(Dependency('KeyT'),
Dependency('ITEMS_PER_THREAD')),
DependentOperator(Constant(numba.int8), [Dependency('KeyT'), Dependency('KeyT')], Dependency('Op'))]],
type_definitions=[numba_type_to_wrapper(dtype, methods=methods)])
specialization = template.specialize({'KeyT': dtype,
'VIRTUAL_WARP_THREADS': threads_in_warp,
'ITEMS_PER_THREAD': items_per_thread,
'Op': compare_op})

Describe the solution you'd like

We should try abstracting build step for cccl.c.parallel algorithms. If we recognize that certain kernel parameters are iterators / operators, we could automate generating C++ wrappers.

Describe alternatives you've considered

No response

Additional context

No response

@gevtushenko gevtushenko added the feature request New feature or request. label Oct 9, 2024
@github-project-automation github-project-automation bot moved this to Todo in CCCL Oct 9, 2024
@jollylili
Copy link

@wmaxey, I'd like to check in to see if this item is on track? We have 10/10, and 11/14 as estimated start and end date respectively.

@jollylili jollylili added the 2.8.0 target for 2.8.0 release label Nov 15, 2024
@griwes griwes linked a pull request Jan 17, 2025 that will close this issue
2 tasks
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.8.0 target for 2.8.0 release feature request New feature or request.
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

4 participants