Skip to content

Commit cb190fc

Browse files
authored
[SYCL][HIP] Implement PI_DEVICE_INFO_ATOMIC_64 for HIP (#6429)
1 parent a657117 commit cb190fc

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
@@ -1769,8 +1769,17 @@ pi_result hip_piDeviceGetInfo(pi_device device, pi_device_info param_name,
17691769
return getInfo(param_value_size, param_value, param_value_size_ret, value);
17701770
}
17711771

1772+
case PI_DEVICE_INFO_ATOMIC_64: {
1773+
// TODO: Reconsider it when AMD supports SYCL_USE_NATIVE_FP_ATOMICS.
1774+
hipDeviceProp_t props;
1775+
cl::sycl::detail::pi::assertion(
1776+
hipGetDeviceProperties(&props, device->get()) == hipSuccess);
1777+
return getInfo(param_value_size, param_value, param_value_size_ret,
1778+
props.arch.hasGlobalInt64Atomics &&
1779+
props.arch.hasSharedInt64Atomics);
1780+
}
1781+
17721782
// TODO: Implement.
1773-
case PI_DEVICE_INFO_ATOMIC_64:
17741783
case PI_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES:
17751784
// TODO: Investigate if this information is available on HIP.
17761785
case PI_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES:

0 commit comments

Comments
 (0)