File tree Expand file tree Collapse file tree
unified-runtime/source/adapters/cuda Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -505,6 +505,23 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesUnsampledImageCreateExp(
505505 hDevice) != hContext->getDevices ().end (),
506506 UR_RESULT_ERROR_INVALID_CONTEXT );
507507
508+ const int unsupportedImageChannelTypes[] = {
509+ UR_IMAGE_CHANNEL_TYPE_SNORM_INT8 ,
510+ UR_IMAGE_CHANNEL_TYPE_SNORM_INT16 ,
511+ UR_IMAGE_CHANNEL_TYPE_UNORM_INT8 ,
512+ UR_IMAGE_CHANNEL_TYPE_UNORM_INT16 ,
513+ UR_IMAGE_CHANNEL_TYPE_UNORM_SHORT_565 ,
514+ UR_IMAGE_CHANNEL_TYPE_UNORM_SHORT_555 };
515+ if (std::find (std::begin (unsupportedImageChannelTypes),
516+ std::end (unsupportedImageChannelTypes),
517+ pImageFormat->channelType ) !=
518+ std::end (unsupportedImageChannelTypes)) {
519+ UR_LOG (
520+ ERR ,
521+ " CUDA does not support normalized channel types for unsampled images" );
522+ return UR_RESULT_ERROR_UNSUPPORTED_FEATURE ;
523+ }
524+
508525 unsigned int NumChannels = 0 ;
509526 UR_CALL (urCalculateNumChannels (pImageFormat->channelOrder , &NumChannels));
510527
You can’t perform that action at this time.
0 commit comments