diff --git a/cmake/BuildFlags.cmake b/cmake/BuildFlags.cmake index e9986fadfe..e4fa6ce618 100644 --- a/cmake/BuildFlags.cmake +++ b/cmake/BuildFlags.cmake @@ -55,9 +55,11 @@ macro(set_build_flags) # SYCL headers, such as deprecated warnings, even if warned API is not actually used in the program. # We expect that this issue will be addressed in the later version of DPC++ compiler. To workaround # the issue we wrap paths to SYCL headers in `-isystem`. - foreach(FLAGS IN LISTS SYCL_INCLUDE_DIR) - list(APPEND SYCL_HOST_FLAGS "-isystem ${FLAGS}") - endforeach() + if(SYCL_COMPILER_VERSION VERSION_LESS 20250300) + foreach(FLAGS IN LISTS SYCL_INCLUDE_DIR) + list(APPEND SYCL_HOST_FLAGS "-isystem ${FLAGS}") + endforeach() + endif() # Excluding warnings which flood the compilation output # TODO: fix warnings in the source code and then reenable them in compilation list(APPEND SYCL_HOST_FLAGS -Wno-sign-compare) diff --git a/src/ATen/native/xpu/sycl/AdaptiveAveragePooling2dKernels.cpp b/src/ATen/native/xpu/sycl/AdaptiveAveragePooling2dKernels.cpp index 01016494cf..ed1c1c6b50 100644 --- a/src/ATen/native/xpu/sycl/AdaptiveAveragePooling2dKernels.cpp +++ b/src/ATen/native/xpu/sycl/AdaptiveAveragePooling2dKernels.cpp @@ -695,6 +695,8 @@ struct AdaptiveAvgPool2dKernelFunctor_cl { numel_(numel) {} private: + vec_t* output_; + const vec_t* input_; int ih_; int iw_; int ob_; @@ -702,8 +704,6 @@ struct AdaptiveAvgPool2dKernelFunctor_cl { int oh_; int ow_; int64_t numel_; - const vec_t* input_; - vec_t* output_; }; #define LAUNCH_AVGPOOL_CHANNEL_LAST_VEC( \