Skip to content

Commit

Permalink
[HIP][CMDBUF] Require ROCm 5.5.1 for HIP command-buffers
Browse files Browse the repository at this point in the history
An issue using the command-buffer experimental feature was
discovered using HIP version 5.4.3 - ROCm/HIP#2450

Set the minimum supported version as ROCm 5.5.1 to avoid this bug,
as this is the next ROCm available version after 5.4.3 we have
have available for testing and can confirm passes the SYCL-Graph
tests.

Note: The ROCm version tested by DPC++ GitHub CI is currently 6.0.0.
  • Loading branch information
EwanC committed Mar 19, 2024
1 parent 4d0183a commit cb9d024
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions source/adapters/hip/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,20 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
// native asserts are in progress
std::string SupportedExtensions = "";
SupportedExtensions += "pi_ext_intel_devicelib_assert ";
// Return supported for the UR command-buffer experimental feature
SupportedExtensions += "ur_exp_command_buffer ";

int RuntimeVersion = 0;
UR_CHECK_ERROR(hipRuntimeGetVersion(&RuntimeVersion));

// Return supported for the UR command-buffer experimental feature on
// ROCM 5.5.1 and later. This is to workaround HIP driver bug
// https://github.com/ROCm/HIP/issues/2450 in older versions.
//
// The version is returned as (10000000 major + 1000000 minor + patch).
const int CmdBufDriverMinVersion = 50530202; // ROCM 5.5.1
if (RuntimeVersion >= CmdBufDriverMinVersion) {
SupportedExtensions += "ur_exp_command_buffer ";
}

SupportedExtensions += " ";

hipDeviceProp_t Props;
Expand Down Expand Up @@ -844,9 +856,18 @@ UR_APIEXPORT ur_result_t UR_APICALL urDeviceGetInfo(ur_device_handle_t hDevice,
return UR_RESULT_ERROR_UNSUPPORTED_ENUMERATION;

case UR_DEVICE_INFO_COMMAND_BUFFER_SUPPORT_EXP:
case UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_SUPPORT_EXP:
return ReturnValue(true);
case UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_SUPPORT_EXP: {
int DriverVersion = 0;
UR_CHECK_ERROR(hipDriverGetVersion(&DriverVersion));

// Return supported for the UR command-buffer experimental feature on
// ROCM 5.5.1 and later. This is to workaround HIP driver bug
// https://github.com/ROCm/HIP/issues/2450 in older versions.
//
// The version is returned as (10000000 major + 1000000 minor + patch).
const int CmdBufDriverMinVersion = 50530202; // ROCM 5.5.1
return ReturnValue(DriverVersion >= CmdBufDriverMinVersion);
}
default:
break;
}
Expand Down

0 comments on commit cb9d024

Please sign in to comment.