From 34506cbd06ce4d49ac90736239efea01bd295813 Mon Sep 17 00:00:00 2001 From: zhiweij1 Date: Wed, 2 Nov 2022 16:03:54 +0800 Subject: [PATCH] [SYCLomatic] Remove deprecated API is_host() (#330) Signed-off-by: Jiang, Zhiwei --- clang/runtime/dpct-rt/include/device.hpp.inc | 13 ++----------- clang/test/dpct/helper_files_ref/include/device.hpp | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/clang/runtime/dpct-rt/include/device.hpp.inc b/clang/runtime/dpct-rt/include/device.hpp.inc index c7b60ee0fb03..551fae0e8f63 100644 --- a/clang/runtime/dpct-rt/include/device.hpp.inc +++ b/clang/runtime/dpct-rt/include/device.hpp.inc @@ -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()); - } + prop.set_max_clock_frequency( + get_info()); prop.set_max_compute_units( get_info()); diff --git a/clang/test/dpct/helper_files_ref/include/device.hpp b/clang/test/dpct/helper_files_ref/include/device.hpp index 9235c83b1fca..aa35311f9567 100644 --- a/clang/test/dpct/helper_files_ref/include/device.hpp +++ b/clang/test/dpct/helper_files_ref/include/device.hpp @@ -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()); - } + prop.set_max_clock_frequency( + get_info()); prop.set_max_compute_units( get_info());