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

Enable creation of bindless images backed by host USM #2551

Merged

Conversation

przemektmalon
Copy link
Contributor

@przemektmalon przemektmalon commented Jan 13, 2025

Small patch to enable bindless images backed by host USM in the CUDA adapter.

Host and Device USM pointers are usable across the host and device for all versions of CUDA that we support. There is no need to provide the CU_MEMHOSTALLOC_DEVICEMAP flag during allocation, or calling cuMemHostGetDevicePointer to retrieve a device usable address.

Passing a CU_MEMHOSTALLOC_WRITECOMBINED flag to the host USM allocation will enhance performance in certain scenarios, however, an extension allowing this is not yet available.

Related DPC++ PR: intel/llvm#16607

@przemektmalon przemektmalon requested a review from a team as a code owner January 13, 2025 16:18
@github-actions github-actions bot added images UR images cuda CUDA adapter specific issues labels Jan 13, 2025
@przemektmalon przemektmalon force-pushed the przemek/bindless-images-host-usm branch from 7005365 to d49c8cd Compare January 20, 2025 10:31
@przemektmalon przemektmalon added the ready to merge Added to PR's which are ready to merge label Jan 20, 2025
@kbenzie kbenzie removed the ready to merge Added to PR's which are ready to merge label Jan 20, 2025
@kbenzie
Copy link
Contributor

kbenzie commented Jan 20, 2025

I've removed ready to merge as intel/llvm#16607 still requires approvals (except from unified-runtime-reviewers) and must have all checks passing. Please add the lable again once these conditions are satisfied.

@przemektmalon przemektmalon force-pushed the przemek/bindless-images-host-usm branch 3 times, most recently from 01c0c0e to 38da1bd Compare January 22, 2025 15:24
Small patch to enable bindless images backed by host USM in the CUDA
adapter.

Host and Device USM pointers are usable across the host and device
for all versions of CUDA that we support. There is no need to provide
the `CU_MEMHOSTALLOC_DEVICEMAP` flag during allocation, or calling
`cuMemHostGetDevicePointer` to retrieve a device usable address.

Passing a `CU_MEMHOSTALLOC_WRITECOMBINED` flag to the host USM
allocation will enhance performance in certain scenarios, however, an
extension allowing this is not yet available.
@przemektmalon przemektmalon force-pushed the przemek/bindless-images-host-usm branch from 38da1bd to eeff9f4 Compare January 23, 2025 11:00
@przemektmalon przemektmalon added the ready to merge Added to PR's which are ready to merge label Jan 23, 2025
@przemektmalon
Copy link
Contributor Author

Added ready to merge label.
intel/llvm#16607 passed CI and has approval.
I've just re-based this PR and updated the tag in LLVM, so CI is re-running.

@kbenzie kbenzie merged commit 0bb6789 into oneapi-src:main Jan 27, 2025
26 checks passed
dm-vodopyanov pushed a commit to intel/llvm that referenced this pull request Jan 27, 2025
This patch adds a test for an image backed by a host USM allocation.

Related UR PR: oneapi-src/unified-runtime#2551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA adapter specific issues images UR images ready to merge Added to PR's which are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants