@@ -128,6 +128,7 @@ hipToUrImageChannelFormat(hipArray_Format hip_format,
128
128
*return_image_channel_type = TO; \
129
129
return UR_RESULT_SUCCESS; \
130
130
}
131
+
131
132
HIP_TO_UR_IMAGE_CHANNEL_TYPE (HIP_AD_FORMAT_UNSIGNED_INT8,
132
133
UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8);
133
134
HIP_TO_UR_IMAGE_CHANNEL_TYPE (HIP_AD_FORMAT_UNSIGNED_INT16,
@@ -144,6 +145,8 @@ hipToUrImageChannelFormat(hipArray_Format hip_format,
144
145
UR_IMAGE_CHANNEL_TYPE_HALF_FLOAT);
145
146
HIP_TO_UR_IMAGE_CHANNEL_TYPE (HIP_AD_FORMAT_FLOAT,
146
147
UR_IMAGE_CHANNEL_TYPE_FLOAT);
148
+
149
+ #undef HIP_TO_UR_IMAGE_CHANNEL_TYPE
147
150
default :
148
151
return UR_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT;
149
152
}
@@ -156,7 +159,6 @@ ur_result_t urTextureCreate(ur_sampler_handle_t hSampler,
156
159
ur_exp_image_native_handle_t *phRetImage) {
157
160
158
161
try {
159
- // / pi_sampler_properties
160
162
// / Layout of UR samplers for HIP
161
163
// /
162
164
// / Sampler property layout:
@@ -425,12 +427,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageFreeExp(
425
427
try {
426
428
hipArray_t ImageArray = reinterpret_cast <hipArray_t>(hImageMem);
427
429
UR_CHECK_ERROR (hipArrayDestroy (ImageArray));
428
- if (auto It = hDevice->ChildHipArrayFromMipmapMap .find (ImageArray);
429
- It != hDevice->ChildHipArrayFromMipmapMap .end ()) {
430
- UR_CHECK_ERROR (hipMipmappedArrayDestroy (
431
- static_cast <hipMipmappedArray_t>(It->second )));
432
- hDevice->ChildHipArrayFromMipmapMap .erase (It);
433
- }
434
430
} catch (ur_result_t Err) {
435
431
return Err;
436
432
} catch (...) {
@@ -625,7 +621,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(
625
621
626
622
if (memType == hipMemoryTypeArray) {
627
623
// HIP doesn not provide async copies between host and image arrays
628
- // memory in versions early than 6.2.
624
+ // memory in versions earlier than 6.2.
629
625
#if HIP_VERSION >= 60200000
630
626
UR_CHECK_ERROR (
631
627
hipMemcpyHtoAAsync (static_cast <hipArray_t>(pDst),
@@ -733,7 +729,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImageCopyExp(
733
729
734
730
if (memType == hipMemoryTypeArray) {
735
731
// HIP doesn not provide async copies between image arrays and host
736
- // memory in versions early than 6.2.
732
+ // memory in versions earlier than 6.2.
737
733
#if HIP_VERSION >= 60200000
738
734
UR_CHECK_ERROR (hipMemcpyAtoHAsync (
739
735
DstWithOffset, static_cast <hipArray_t>(const_cast <void *>(pSrc)),
@@ -1095,8 +1091,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImportExternalMemoryExp(
1095
1091
extMemDesc.type = hipExternalMemoryHandleTypeOpaqueWin32;
1096
1092
break ;
1097
1093
case UR_EXP_EXTERNAL_MEM_TYPE_WIN32_NT_DX12_RESOURCE:
1098
- // Memory descriptor flag values such as hipExternalMemoryDedicatedare
1099
- // not available before HIP 5.6, so we safely fallback to unsupported.
1094
+ // Memory descriptor flag values such as hipExternalMemoryDedicated
1095
+ // are not available before HIP 5.6, so we safely fallback to marking
1096
+ // this as an unsupported.
1100
1097
#if HIP_VERSION >= 50600000
1101
1098
extMemDesc.type = hipExternalMemoryHandleTypeD3D12Resource;
1102
1099
extMemDesc.flags = hipExternalMemoryDedicated;
@@ -1230,6 +1227,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urBindlessImagesImportExternalSemaphoreExp(
1230
1227
extSemDesc.type = hipExternalSemaphoreHandleTypeD3D12Fence;
1231
1228
break ;
1232
1229
case UR_EXP_EXTERNAL_SEMAPHORE_TYPE_OPAQUE_FD:
1230
+ [[fallthrough]];
1233
1231
default :
1234
1232
return UR_RESULT_ERROR_INVALID_VALUE;
1235
1233
}
0 commit comments