Skip to content

Commit

Permalink
Merge pull request #2551 from przemektmalon/przemek/bindless-images-h…
Browse files Browse the repository at this point in the history
…ost-usm

Enable creation of bindless images backed by host USM
  • Loading branch information
kbenzie authored Jan 27, 2025
2 parents e370a2b + eeff9f4 commit 0bb6789
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/adapters/cuda/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesSampledImageCreateExp(
image_res_desc.resType = CU_RESOURCE_TYPE_MIPMAPPED_ARRAY;
image_res_desc.res.mipmap.hMipmappedArray = (CUmipmappedArray)hImageMem;
}
} else if (mem_type == CU_MEMORYTYPE_DEVICE) {
// We have a USM pointer
} else if (mem_type == CU_MEMORYTYPE_DEVICE ||
mem_type == CU_MEMORYTYPE_HOST) {
// We have a USM pointer.
// Images may be created from device or host USM.
if (pImageDesc->type == UR_MEM_TYPE_IMAGE1D) {
image_res_desc.resType = CU_RESOURCE_TYPE_LINEAR;
image_res_desc.res.linear.devPtr = (CUdeviceptr)hImageMem;
Expand Down

0 comments on commit 0bb6789

Please sign in to comment.