Skip to content

Commit 06f48f6

Browse files
authored
Merge pull request #2356 from npmiller/hip-images
[HIP] Disable SYCL images by default
2 parents 098deca + 1b373f8 commit 06f48f6

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

source/adapters/cuda/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
292292
logger::always(
293293
"Images are not fully supported by the CUDA BE, their support is "
294294
"disabled by default. Their partial support can be activated by "
295-
"setting SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT environment variable at "
295+
"setting UR_CUDA_ENABLE_IMAGE_SUPPORT environment variable at "
296296
"runtime.");
297297
}
298298

source/adapters/hip/device.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "adapter.hpp"
1313
#include "context.hpp"
1414
#include "event.hpp"
15+
#include "logger/ur_logger.hpp"
1516

1617
#include <sstream>
1718

@@ -223,7 +224,19 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
223224
return ReturnValue(uint64_t{MaxAlloc});
224225
}
225226
case UR_DEVICE_INFO_IMAGE_SUPPORTED: {
226-
return ReturnValue(ur_bool_t{true});
227+
bool Enabled = false;
228+
229+
if (std::getenv("UR_HIP_ENABLE_IMAGE_SUPPORT") != nullptr) {
230+
Enabled = true;
231+
} else {
232+
logger::always(
233+
"Images are not fully supported by the HIP BE, their support is "
234+
"disabled by default. Their partial support can be activated by "
235+
"setting UR_HIP_ENABLE_IMAGE_SUPPORT environment variable at "
236+
"runtime.");
237+
}
238+
239+
return ReturnValue(Enabled);
227240
}
228241
case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: {
229242
// This call doesn't match to HIP as it doesn't have images, but instead
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
urMemImageCreateTest.InvalidSize/*
2-
urMemImageGetInfoTest.Success/*
32
urMemBufferCreateWithNativeHandleTest.Success/*
43
urMemBufferCreateWithNativeHandleTest.SuccessWithOwnedNativeHandle/*
54
urMemBufferCreateWithNativeHandleTest.SuccessWithUnOwnedNativeHandle/*
6-
urMemImageCreateWithNativeHandleTest.Success/*

0 commit comments

Comments
 (0)