Skip to content
Merged
Changes from all commits
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
27 changes: 21 additions & 6 deletions sycl/plugins/cuda/pi_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1303,12 +1303,27 @@ pi_result cuda_piDeviceGetInfo(pi_device device, pi_device_info param_name,
return getInfo(param_value_size, param_value, param_value_size_ret,
capabilities);
}
case PI_EXT_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES:
case PI_EXT_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES:
// There is no way to query this in the backend
setErrorMessage("CUDA backend does not support this query",
PI_ERROR_INVALID_ARG_VALUE);
return PI_ERROR_PLUGIN_SPECIFIC_ERROR;
case PI_EXT_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES: {
// SYCL2020 4.6.4.2 minimum mandated capabilities for
// atomic_fence_order_capabilities.
pi_memory_order_capabilities capabilities =
PI_MEMORY_ORDER_RELAXED | PI_MEMORY_ORDER_ACQUIRE |
PI_MEMORY_ORDER_RELEASE | PI_MEMORY_ORDER_ACQ_REL;
return getInfo(param_value_size, param_value, param_value_size_ret,
capabilities);
}
case PI_EXT_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES: {
// SYCL2020 4.6.4.2 minimum mandated capabilities for
// atomic_fence/memory_scope_capabilities.
// Because scopes are hierarchical, wider scopes support all narrower
// scopes. At a minimum, each device must support WORK_ITEM, SUB_GROUP and
// WORK_GROUP. (https://github.com/KhronosGroup/SYCL-Docs/pull/382)
pi_memory_scope_capabilities capabilities = PI_MEMORY_SCOPE_WORK_ITEM |
PI_MEMORY_SCOPE_SUB_GROUP |
PI_MEMORY_SCOPE_WORK_GROUP;
return getInfo(param_value_size, param_value, param_value_size_ret,
capabilities);
}
case PI_EXT_ONEAPI_DEVICE_INFO_BFLOAT16_MATH_FUNCTIONS: {
int major = 0;
sycl::detail::pi::assertion(
Expand Down