Skip to content

Commit a1b42aa

Browse files
zjin-lcfJin Znpmiller
authored
[SYCL][HIP] Vendor ID for AMD devices is expected to be 4098 (#6127)
A pull request to solve the issue #6123 Co-authored-by: Jin Z <5zj@cousteau.ftpn.ornl.gov> Co-authored-by: Nicolas Miller <nicolas.pierre.miller@gmail.com>
1 parent 2e24304 commit a1b42aa

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

sycl/plugins/hip/pi_hip.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,16 @@ pi_result hip_piDeviceGetInfo(pi_device device, pi_device_info param_name,
980980
PI_DEVICE_TYPE_GPU);
981981
}
982982
case PI_DEVICE_INFO_VENDOR_ID: {
983-
return getInfo(param_value_size, param_value, param_value_size_ret, 4318u);
983+
#if defined(__HIP_PLATFORM_AMD__)
984+
pi_uint32 vendor_id = 4098u;
985+
#elif defined(__HIP_PLATFORM_NVIDIA__)
986+
pi_uint32 vendor_id = 4318u;
987+
#else
988+
pi_uint32 vendor_id = 0u;
989+
#endif
990+
991+
return getInfo(param_value_size, param_value, param_value_size_ret,
992+
vendor_id);
984993
}
985994
case PI_DEVICE_INFO_MAX_COMPUTE_UNITS: {
986995
int compute_units = 0;

0 commit comments

Comments
 (0)