Skip to content

Commit

Permalink
Merge pull request oneapi-src#1822 from JackAKirk/cuda-cubemap-driver…
Browse files Browse the repository at this point in the history
…-fix

[cuda][bindless_images][2025.0 req] Fix for cuda < 11.6 support.
  • Loading branch information
kbenzie authored Jul 9, 2024
2 parents e077544 + 1c9c2d0 commit 9d3bce6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -7665,6 +7665,7 @@ urBindlessImagesImageFreeExp(
/// + `pImageDesc && UR_MEM_TYPE_IMAGE1D_ARRAY < pImageDesc->type`
/// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
UR_APIEXPORT ur_result_t UR_APICALL
urBindlessImagesUnsampledImageCreateExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
Expand Down Expand Up @@ -7703,6 +7704,7 @@ urBindlessImagesUnsampledImageCreateExp(
/// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE
/// - ::UR_RESULT_ERROR_INVALID_SAMPLER
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
UR_APIEXPORT ur_result_t UR_APICALL
urBindlessImagesSampledImageCreateExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
Expand Down
2 changes: 2 additions & 0 deletions scripts/core/exp-bindless-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ returns:
- "`pImageDesc && UR_MEM_TYPE_IMAGE1D_ARRAY < pImageDesc->type`"
- $X_RESULT_ERROR_INVALID_IMAGE_SIZE
- $X_RESULT_ERROR_INVALID_OPERATION
- $X_RESULT_ERROR_ADAPTER_SPECIFIC
--- #--------------------------------------------------------------------------
type: function
desc: "Create a bindless sampled image handle"
Expand Down Expand Up @@ -507,6 +508,7 @@ returns:
- $X_RESULT_ERROR_INVALID_IMAGE_SIZE
- $X_RESULT_ERROR_INVALID_SAMPLER
- $X_RESULT_ERROR_INVALID_OPERATION
- $X_RESULT_ERROR_ADAPTER_SPECIFIC
--- #--------------------------------------------------------------------------
type: function
desc: "Copy image data Host to Device or Device to Host"
Expand Down
7 changes: 7 additions & 0 deletions source/adapters/cuda/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,14 @@ ur_result_t urTextureCreate(ur_sampler_handle_t hSampler,
ur_exp_sampler_cubemap_filter_mode_t CubemapFilterModeProp =
hSampler->getCubemapFilterMode();
if (CubemapFilterModeProp == UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_SEAMLESS) {
#if CUDA_VERSION >= 11060
ImageTexDesc.flags |= CU_TRSF_SEAMLESS_CUBEMAP;
#else
setErrorMessage("The " UR_EXP_SAMPLER_CUBEMAP_FILTER_MODE_SEAMLESS
" feature requires cuda 11.6 or later.",
UR_RESULT_ERROR_ADAPTER_SPECIFIC);
return UR_RESULT_ERROR_ADAPTER_SPECIFIC;
#endif
}

CUtexObject Texture;
Expand Down
2 changes: 2 additions & 0 deletions source/loader/ur_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6702,6 +6702,7 @@ ur_result_t UR_APICALL urBindlessImagesImageFreeExp(
/// + `pImageDesc && UR_MEM_TYPE_IMAGE1D_ARRAY < pImageDesc->type`
/// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
ur_result_t UR_APICALL urBindlessImagesUnsampledImageCreateExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
Expand Down Expand Up @@ -6754,6 +6755,7 @@ ur_result_t UR_APICALL urBindlessImagesUnsampledImageCreateExp(
/// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE
/// - ::UR_RESULT_ERROR_INVALID_SAMPLER
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
ur_result_t UR_APICALL urBindlessImagesSampledImageCreateExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
Expand Down
2 changes: 2 additions & 0 deletions source/ur_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5724,6 +5724,7 @@ ur_result_t UR_APICALL urBindlessImagesImageFreeExp(
/// + `pImageDesc && UR_MEM_TYPE_IMAGE1D_ARRAY < pImageDesc->type`
/// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
ur_result_t UR_APICALL urBindlessImagesUnsampledImageCreateExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
Expand Down Expand Up @@ -5767,6 +5768,7 @@ ur_result_t UR_APICALL urBindlessImagesUnsampledImageCreateExp(
/// - ::UR_RESULT_ERROR_INVALID_IMAGE_SIZE
/// - ::UR_RESULT_ERROR_INVALID_SAMPLER
/// - ::UR_RESULT_ERROR_INVALID_OPERATION
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
ur_result_t UR_APICALL urBindlessImagesSampledImageCreateExp(
ur_context_handle_t hContext, ///< [in] handle of the context object
ur_device_handle_t hDevice, ///< [in] handle of the device object
Expand Down

0 comments on commit 9d3bce6

Please sign in to comment.