From 79a4131415f1525c18d45c4df3e801de6dd19172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 8 Nov 2024 15:53:39 +0100 Subject: [PATCH] include: Add missing DNNL_EXPERIMENTAL_UKERNEL ifdef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a missing `#ifdef DNNL_EXPERIMENTAL_UKERNEL` around `dnnl_api_utils` group. The templates inside that group reference `dnnl_brgemm_t` and `dnnl_brgemm_pack_B_t` types that are guarded using the same condition, and therefore attempting to include the file without the define results in errors: ``` /home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:38:22: error: ‘dnnl_brgemm_t’ was not declared in this scope; did you mean ‘dnnl_stream_t’? 38 | struct handle_traits { | ^~~~~~~~~~~~~ | dnnl_stream_t /home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:38:35: error: template argument 1 is invalid 38 | struct handle_traits { | ^ /home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:45:22: error: ‘dnnl_brgemm_pack_B_t’ was not declared in this scope 45 | struct handle_traits { | ^~~~~~~~~~~~~~~~~~~~ /home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:45:42: error: template argument 1 is invalid 45 | struct handle_traits { | ^ ``` --- include/oneapi/dnnl/dnnl_ukernel.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/oneapi/dnnl/dnnl_ukernel.hpp b/include/oneapi/dnnl/dnnl_ukernel.hpp index cc4c963e642..2be7af85afe 100644 --- a/include/oneapi/dnnl/dnnl_ukernel.hpp +++ b/include/oneapi/dnnl/dnnl_ukernel.hpp @@ -29,6 +29,8 @@ /// oneDNN namespace namespace dnnl { +#ifdef DNNL_EXPERIMENTAL_UKERNEL + /// @addtogroup dnnl_api_utils /// @{ @@ -59,6 +61,8 @@ struct handle_traits { /// @} dnnl_api_utils +#endif + /// @addtogroup dnnl_api_ukernel Ukernels /// Collection of ukernels /// @{