Skip to content

Commit

Permalink
Prevent building errors caused by SYCL compiler (#1070)
Browse files Browse the repository at this point in the history
Directly caused by CXX flag `-Werror`:

```bash
oneapi/compiler/2025.0/bin/compiler/../../include/sycl/detail/builtins/builtins.hpp:235:1: error: multi-line comment [-Werror=comment]
// clang++ -[DU]__SYCL_DEVICE_ONLY__ -x c++ math_functions.inc  \
```
  • Loading branch information
xytintel authored Nov 11, 2024
2 parents ee930ce + a46fc12 commit fa35a4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)

set(PROJECT_NAME "torch-xpu-ops")
set(PROJECT_VERSION "2.3.0")
# Avoid SYCL compiler error
string(APPEND CMAKE_CXX_FLAGS " -Wno-error=comment")

cmake_policy(SET CMP0048 NEW)
project(${PROJECT_NAME} VERSION "${PROJECT_VERSION}" LANGUAGES C CXX)

Expand Down

0 comments on commit fa35a4d

Please sign in to comment.