Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Rename usm_system_allocator to usm_system_allocations #4007

Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion sycl/include/CL/sycl/aspects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ enum class aspect {
usm_host_allocations = 14,
usm_shared_allocations = 15,
usm_restricted_shared_allocations = 16,
usm_system_allocator = 17,
usm_system_allocations = 17,
usm_system_allocator __SYCL2020_DEPRECATED(
"use usm_system_allocations instead") = usm_system_allocations,
ext_intel_pci_address = 18,
ext_intel_gpu_eu_count = 19,
ext_intel_gpu_eu_simd_width = 20,
Expand Down
2 changes: 1 addition & 1 deletion sycl/include/CL/sycl/info/device_traits.def
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ __SYCL_PARAM_TRAITS_SPEC(device, usm_device_allocations, bool)
__SYCL_PARAM_TRAITS_SPEC(device, usm_host_allocations, bool)
__SYCL_PARAM_TRAITS_SPEC(device, usm_shared_allocations, bool)
__SYCL_PARAM_TRAITS_SPEC(device, usm_restricted_shared_allocations, bool)
__SYCL_PARAM_TRAITS_SPEC(device, usm_system_allocator, bool)
__SYCL_PARAM_TRAITS_SPEC(device, usm_system_allocations, bool)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_pci_address, std::string)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_gpu_eu_count, pi_uint32)
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_gpu_eu_simd_width, pi_uint32)
Expand Down
5 changes: 4 additions & 1 deletion sycl/include/CL/sycl/info/info_desc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ enum class device : cl_device_info {
usm_host_allocations = PI_USM_HOST_SUPPORT,
usm_shared_allocations = PI_USM_SINGLE_SHARED_SUPPORT,
usm_restricted_shared_allocations = PI_USM_CROSS_SHARED_SUPPORT,
usm_system_allocator = PI_USM_SYSTEM_SHARED_SUPPORT,
usm_system_allocations = PI_USM_SYSTEM_SHARED_SUPPORT,
usm_system_allocator __SYCL2020_DEPRECATED(
"use usm_system_allocations instead") = usm_system_allocations,

// intel extensions
ext_intel_pci_address = PI_DEVICE_INFO_PCI_ADDRESS,
ext_intel_gpu_eu_count = PI_DEVICE_INFO_GPU_EU_COUNT,
Expand Down
4 changes: 2 additions & 2 deletions sycl/source/detail/device_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ bool device_impl::has(aspect Aspect) const {
PI_USM_ATOMIC_ACCESS);
case aspect::usm_restricted_shared_allocations:
return get_info<info::device::usm_restricted_shared_allocations>();
case aspect::usm_system_allocator:
return get_info<info::device::usm_system_allocator>();
case aspect::usm_system_allocations:
return get_info<info::device::usm_system_allocations>();
case aspect::ext_intel_pci_address:
return getPlugin().call_nocheck<detail::PiApiKind::piDeviceGetInfo>(
MDevice, PI_DEVICE_INFO_PCI_ADDRESS, sizeof(pi_device_type),
Expand Down
6 changes: 3 additions & 3 deletions sycl/source/detail/device_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ get_device_info_host<info::device::usm_restricted_shared_allocations>() {
}

template <>
inline bool get_device_info_host<info::device::usm_system_allocator>() {
inline bool get_device_info_host<info::device::usm_system_allocations>() {
return true;
}

Expand Down Expand Up @@ -1032,11 +1032,11 @@ struct get_device_info<bool, info::device::usm_restricted_shared_allocations> {
};

// Specialization for system usm query
template <> struct get_device_info<bool, info::device::usm_system_allocator> {
template <> struct get_device_info<bool, info::device::usm_system_allocations> {
static bool get(RT::PiDevice dev, const plugin &Plugin) {
pi_usm_capabilities caps;
pi_result Err = Plugin.call_nocheck<PiApiKind::piDeviceGetInfo>(
dev, pi::cast<RT::PiDeviceInfo>(info::device::usm_system_allocator),
dev, pi::cast<RT::PiDeviceInfo>(info::device::usm_system_allocations),
sizeof(pi_usm_capabilities), &caps, nullptr);
return (Err != PI_SUCCESS) ? false : (caps & PI_USM_ACCESS);
}
Expand Down
3 changes: 3 additions & 0 deletions sycl/test/on-device/basic_tests/aspects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ int main() {
if (plt.has(aspect::usm_system_allocator)) {
std::cout << " USM system allocator" << std::endl;
}
if (plt.has(aspect::usm_system_allocations)) {
std::cout << " USM system allocations" << std::endl;
}
}
std::cout << "Passed." << std::endl;
return 0;
Expand Down