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

[SYCLomatic] Remove deprecated API is_host() #330

Merged
merged 1 commit into from
Nov 2, 2022
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
13 changes: 2 additions & 11 deletions clang/runtime/dpct-rt/include/device.hpp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -588,17 +588,8 @@ public:
prop.set_host_unified_memory(
this->has(sycl::aspect::usm_host_allocations));

// max_clock_frequency parameter is not supported on host device
if (is_host()) {
// This code may need to be updated. Currently max_clock_frequency for
// host device is initialized with 1, in assumption that if other devices
// exist and they are being selected based on this parameter, other
// devices would have higher priority.
prop.set_max_clock_frequency(1);
} else {
prop.set_max_clock_frequency(
get_info<sycl::info::device::max_clock_frequency>());
}
prop.set_max_clock_frequency(
get_info<sycl::info::device::max_clock_frequency>());

prop.set_max_compute_units(
get_info<sycl::info::device::max_compute_units>());
Expand Down
13 changes: 2 additions & 11 deletions clang/test/dpct/helper_files_ref/include/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,8 @@ class device_ext : public sycl::device {
prop.set_host_unified_memory(
this->has(sycl::aspect::usm_host_allocations));

// max_clock_frequency parameter is not supported on host device
if (is_host()) {
// This code may need to be updated. Currently max_clock_frequency for
// host device is initialized with 1, in assumption that if other devices
// exist and they are being selected based on this parameter, other
// devices would have higher priority.
prop.set_max_clock_frequency(1);
} else {
prop.set_max_clock_frequency(
get_info<sycl::info::device::max_clock_frequency>());
}
prop.set_max_clock_frequency(
get_info<sycl::info::device::max_clock_frequency>());

prop.set_max_compute_units(
get_info<sycl::info::device::max_compute_units>());
Expand Down