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

[compat] Remove usage of __SYCL_COMPILER_VERSION #16812

Merged
merged 1 commit into from
Jan 29, 2025
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
19 changes: 1 addition & 18 deletions sycl/include/syclcompat/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ class device_ext : public sycl::device {
/// \param [out] total_memory The number of bytes of total memory on the SYCL
/// device.
void get_memory_info(size_t &free_memory, size_t &total_memory) const {
#if (defined(__SYCL_COMPILER_VERSION) && __SYCL_COMPILER_VERSION >= 20221105)
if (!has(sycl::aspect::ext_intel_free_memory)) {
std::cerr << "[SYCLCompat] get_memory_info: ext_intel_free_memory is not "
"supported."
Expand All @@ -459,17 +458,6 @@ class device_ext : public sycl::device {
} else {
free_memory = get_info<sycl::ext::intel::info::device::free_memory>();
}
#else
std::cerr << "[SYCLCompat] get_memory_info: ext_intel_free_memory is not "
"supported."
<< std::endl;
free_memory = 0;
#if defined(_MSC_VER) && !defined(__clang__)
#pragma message("Querying the number of bytes of free memory is not supported")
#else
#warning "Querying the number of bytes of free memory is not supported"
#endif
#endif
total_memory = get_device_info().get_global_mem_size();
}

Expand All @@ -489,15 +477,10 @@ class device_ext : public sycl::device {
prop.set_minor_version(minor);

prop.set_max_work_item_sizes(
#if (__SYCL_COMPILER_VERSION && __SYCL_COMPILER_VERSION < 20220902)
// oneAPI DPC++ compiler older than 2022/09/02, where
// max_work_item_sizes is an enum class element
get_info<sycl::info::device::max_work_item_sizes>());
#else
// SYCL 2020-conformant code, max_work_item_sizes is a struct
// templated by an int
get_info<sycl::info::device::max_work_item_sizes<3>>());
#endif

prop.set_host_unified_memory(has(sycl::aspect::usm_host_allocations));

prop.set_max_clock_frequency(
Expand Down
Loading