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

[cuda][bindless_images][2025.0 req] Fix for cuda < 11.6 support. #1822

Merged
merged 7 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
DBDuncan marked this conversation as resolved.
Show resolved Hide resolved
#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