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] Refactor grid_1d to allow usage in JITIFY kernels #18216

Open
lamarrr opened this issue Mar 10, 2025 · 0 comments
Open

[FEA] Refactor grid_1d to allow usage in JITIFY kernels #18216

lamarrr opened this issue Mar 10, 2025 · 0 comments
Labels
feature request New feature or request

Comments

@lamarrr
Copy link
Contributor

lamarrr commented Mar 10, 2025

Is your feature request related to a problem? Please describe.
We have to write the global thread id calculation in many places within CUDF, specifically within JITIFY kernels.

Examples:

auto const start = threadIdx.x + static_cast<cudf::thread_index_type>(blockIdx.x) * blockDim.x;

auto const start = threadIdx.x + static_cast<cudf::thread_index_type>(blockIdx.x) * blockDim.x;

cudf::thread_index_type i = blockIdx.x * blockDim.x + threadIdx.x;

auto const block_size = static_cast<thread_index_type>(blockDim.x);

This functionality already exists in the grid_1d class .

We can't use it in JITIFY kernels because the headers it is accompanied by contain host code which is problematic for JITIFY.

Some of the problematic headers are:

  • cudf/utilities/default_stream.hpp
  • cudf/utilities/error.hpp
  • rmm/cuda_stream_view.hpp
  • cub/cub.cuh

Describe the solution you'd like

These headers are not required for it to function. We should refactor out the class into a separate device-only header.

@lamarrr lamarrr added the feature request New feature or request label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant