From 10ec149d06ff39e1f864f05990a3dd6fa1e7d390 Mon Sep 17 00:00:00 2001 From: Tadej Ciglaric Date: Tue, 15 Mar 2022 08:34:21 +0000 Subject: [PATCH 1/2] fix unused parameter warnings --- sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp b/sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp index 88737c6c668d5..c75e3bc1b91ae 100644 --- a/sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp +++ b/sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp @@ -41,6 +41,7 @@ std::enable_if_t::value, T> fabs(T x) { #ifdef __SYCL_DEVICE_ONLY__ return __clc_fabs(x); #else + (void) x; throw runtime_error("bf16 is not supported on host device.", PI_INVALID_DEVICE); #endif @@ -50,6 +51,8 @@ std::enable_if_t::value, T> fmin(T x, T y) { #ifdef __SYCL_DEVICE_ONLY__ return __clc_fmin(x, y); #else + (void) x; + (void) y; throw runtime_error("bf16 is not supported on host device.", PI_INVALID_DEVICE); #endif @@ -59,6 +62,8 @@ std::enable_if_t::value, T> fmax(T x, T y) { #ifdef __SYCL_DEVICE_ONLY__ return __clc_fmax(x, y); #else + (void) x; + (void) y; throw runtime_error("bf16 is not supported on host device.", PI_INVALID_DEVICE); #endif @@ -68,6 +73,9 @@ std::enable_if_t::value, T> fma(T x, T y, T z) { #ifdef __SYCL_DEVICE_ONLY__ return __clc_fma(x, y, z); #else + (void) x; + (void) y; + (void) z; throw runtime_error("bf16 is not supported on host device.", PI_INVALID_DEVICE); #endif From fb719e39bb386b73d6be8cc3f597f1d82416039a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Ciglari=C4=8D?= Date: Tue, 15 Mar 2022 08:40:08 +0000 Subject: [PATCH 2/2] format --- .../sycl/ext/oneapi/bf16_storage_builtins.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp b/sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp index c75e3bc1b91ae..ee5c58b67a440 100644 --- a/sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp +++ b/sycl/include/sycl/ext/oneapi/bf16_storage_builtins.hpp @@ -41,7 +41,7 @@ std::enable_if_t::value, T> fabs(T x) { #ifdef __SYCL_DEVICE_ONLY__ return __clc_fabs(x); #else - (void) x; + (void)x; throw runtime_error("bf16 is not supported on host device.", PI_INVALID_DEVICE); #endif @@ -51,8 +51,8 @@ std::enable_if_t::value, T> fmin(T x, T y) { #ifdef __SYCL_DEVICE_ONLY__ return __clc_fmin(x, y); #else - (void) x; - (void) y; + (void)x; + (void)y; throw runtime_error("bf16 is not supported on host device.", PI_INVALID_DEVICE); #endif @@ -62,8 +62,8 @@ std::enable_if_t::value, T> fmax(T x, T y) { #ifdef __SYCL_DEVICE_ONLY__ return __clc_fmax(x, y); #else - (void) x; - (void) y; + (void)x; + (void)y; throw runtime_error("bf16 is not supported on host device.", PI_INVALID_DEVICE); #endif @@ -73,9 +73,9 @@ std::enable_if_t::value, T> fma(T x, T y, T z) { #ifdef __SYCL_DEVICE_ONLY__ return __clc_fma(x, y, z); #else - (void) x; - (void) y; - (void) z; + (void)x; + (void)y; + (void)z; throw runtime_error("bf16 is not supported on host device.", PI_INVALID_DEVICE); #endif