Skip to content

Commit

Permalink
[SYCLomatic] Remove deprecated API is_host() (#330)
Browse files Browse the repository at this point in the history
Signed-off-by: Jiang, Zhiwei <zhiwei.jiang@intel.com>
  • Loading branch information
zhiweij1 authored Nov 2, 2022
1 parent 43e9236 commit 34506cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
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

0 comments on commit 34506cb

Please sign in to comment.