From 242ab85472f5ec02176b4830c4e35c64fae1f5b9 Mon Sep 17 00:00:00 2001 From: Yutao Xu Date: Wed, 28 Aug 2024 22:59:24 +0800 Subject: [PATCH] Update DeviceProperties.h --- src/comm/DeviceProperties.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/comm/DeviceProperties.h b/src/comm/DeviceProperties.h index 7dedeed7c..b98281357 100644 --- a/src/comm/DeviceProperties.h +++ b/src/comm/DeviceProperties.h @@ -190,5 +190,11 @@ uint32_t syclNativeVectorWidth( "Invalid data type to fetch native vector width!"); } +static inline bool syclHasFloat64( + at::DeviceIndex dev_id = at::xpu::getDeviceIndexOfCurrentQueue()) { + auto* dev_prop = at::xpu::getDeviceProperties(dev_id); + return dev_prop->has_fp64; +} + } // namespace sycl } // namespace xpu