Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 1 addition & 1 deletion source/adapters/cuda/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
logger::always(
"Images are not fully supported by the CUDA BE, their support is "
"disabled by default. Their partial support can be activated by "
"setting SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT environment variable at "
"setting UR_CUDA_ENABLE_IMAGE_SUPPORT environment variable at "
"runtime.");
}

Expand Down
15 changes: 14 additions & 1 deletion source/adapters/hip/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "adapter.hpp"
#include "context.hpp"
#include "event.hpp"
#include "logger/ur_logger.hpp"

#include <sstream>

Expand Down Expand Up @@ -223,7 +224,19 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
return ReturnValue(uint64_t{MaxAlloc});
}
case UR_DEVICE_INFO_IMAGE_SUPPORTED: {
return ReturnValue(ur_bool_t{true});
bool Enabled = false;

if (std::getenv("UR_HIP_ENABLE_IMAGE_SUPPORT") != nullptr) {
Enabled = true;
} else {
logger::always(
"Images are not fully supported by the HIP BE, their support is "
"disabled by default. Their partial support can be activated by "
"setting UR_HIP_ENABLE_IMAGE_SUPPORT environment variable at "
"runtime.");
}

return ReturnValue(Enabled);
}
case UR_DEVICE_INFO_MAX_READ_IMAGE_ARGS: {
// This call doesn't match to HIP as it doesn't have images, but instead
Expand Down
Loading