Skip to content

[SYCL] VS2026 fix needs guard in complex - #22994

Open
cperkinsintel wants to merge 2 commits into
intel:syclfrom
cperkinsintel:vs2026-guard-on-complex
Open

[SYCL] VS2026 fix needs guard in complex#22994
cperkinsintel wants to merge 2 commits into
intel:syclfrom
cperkinsintel:vs2026-guard-on-complex

Conversation

@cperkinsintel

Copy link
Copy Markdown
Contributor

test added

@cperkinsintel
cperkinsintel requested a review from a team as a code owner August 21, 2026 22:25
@cperkinsintel
cperkinsintel requested review from KseniyaTikhomirova and a lite review from Copilot August 21, 2026 22:25
@cperkinsintel

Copy link
Copy Markdown
Contributor Author

ping @KseniyaTikhomirova

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes MSVC host-compilation failures in the experimental SYCL complex extension by guarding the inline-visibility macro so cl.exe doesn’t see GCC-style __attribute__, and adds a Windows host-compiler regression test to ensure the complex<T> specialization parses under cl.exe.

Changes:

  • Add _MSC_VER (non-Clang) guard for _SYCL_EXT_CPLX_INLINE_VISIBILITY, using __forceinline for MSVC.
  • Add a new compile-only Windows regression test that instantiates sycl::ext::oneapi::experimental::complex<T> with -fsycl-host-compiler=cl.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
sycl/test/extensions/complex/complex_host_compile_win.cpp New regression test compiling with cl.exe as the SYCL host compiler.
sycl/include/sycl/ext/oneapi/experimental/complex/detail/common.hpp Guard _SYCL_EXT_CPLX_INLINE_VISIBILITY for MSVC (non-Clang) to avoid __attribute__ parsing errors in cl.exe.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +9 to +10
// RUN: %clangxx -fsycl -fsycl-host-compiler=cl -fsycl-host-compiler-options='/std:c++20 /MD /EHsc /permissive- /DSYCL_DISABLE_FSYCL_SYCLHPP_WARNING' %s -c -o %t.o
// UNSUPPORTED: linux

@KseniyaTikhomirova KseniyaTikhomirova left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

nit: BTW, I do agree with Copilot review, win requirement looks more meaningful than disabling on linux.

@sys-ce-bb

Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants