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

Write-combined CUDA host allocations may yield speedup #775

Open
stephenswat opened this issue Nov 18, 2024 · 0 comments
Open

Write-combined CUDA host allocations may yield speedup #775

stephenswat opened this issue Nov 18, 2024 · 0 comments
Labels
cuda Changes related to CUDA good first issue Good for newcomers help wanted Extra attention is needed

Comments

@stephenswat
Copy link
Member

Writing this down in case any students want a fun and relatively self-contained project on traccc.

CUDA allows users to allocate pinned host memory in such a way that allows write-combining; this makes it faster for the host to write to this memory, and also makes it faster to transfer that memory to devices because there need not be as many cache coherency checks on the transfer. The trade-off here is that is makes reads on the host extremely slow.

Documentation on this topic is available at https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__MEMORY.html#group__CUDART__MEMORY_1gb65da58f444e7230d3322b6126bb4902.

The following is a plan for how to implement this:

  1. Implement a write-combined memory resource, or add an option to the existing pinned memory resource.
  2. Use the new memory resource for big allocations which are written to by the host, but which are not read from by the host.

Note that traccc is not currently transfer-bound, but it could still be interesting to try.

@stephenswat stephenswat added cuda Changes related to CUDA good first issue Good for newcomers help wanted Extra attention is needed labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda Changes related to CUDA good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant