Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 3 additions & 1 deletion sycl/include/CL/sycl/aspects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ enum class aspect {
ext_intel_gpu_eu_count_per_subslice = 23,
ext_intel_max_mem_bandwidth = 24,
ext_intel_mem_channel = 25,
atomic64 = 26
usm_atomic_host_allocations = 26,
usm_atomic_shared_allocations = 27,
atomic64 = 28
};

} // namespace sycl
Expand Down
21 changes: 10 additions & 11 deletions sycl/source/detail/device_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,24 +234,23 @@ template <> struct get_device_info<bool, info::device::queue_profiling> {
};

// Specialization for atomic64 that is necessary because
// PI_DEVICE_INFO_ATOMIC_64 isn't implemented for backend other than cuda.
// TODO the if-statement can be removed when the other backends support
// PI_DEVICE_INFO_ATOMIC_64.
// PI_DEVICE_INFO_ATOMIC_64 is currently only implemented for the cuda backend.
template <> struct get_device_info<bool, info::device::atomic64> {
static bool get(RT::PiDevice dev, const plugin &Plugin) {

bool result = false;

platform plt =
get_device_info<platform, info::device::platform>::get(dev, Plugin);

if (plt.get_backend() == backend::cuda) {
Plugin.call<PiApiKind::piDeviceGetInfo>(
dev, pi::cast<RT::PiDeviceInfo>(info::device::atomic64),
sizeof(result), &result, nullptr);
RT::PiResult Err = Plugin.call_nocheck<PiApiKind::piDeviceGetInfo>(
dev, pi::cast<RT::PiDeviceInfo>(info::device::atomic64), sizeof(result),
&result, nullptr);
if (Err == PI_INVALID_VALUE) {
std::cout
<< "The Plugin Interface has returned an error:\n The value of "
"the atomic64 device aspect is unknown, Setting atomic64 "
"= false.\n\n";
}

return (result);
return result;
}
};

Expand Down