Skip to content

Avoid vector calls in SYCL kernels#2693

Merged
dmitriy-sobolev merged 1 commit into
mainfrom
dev/dmitriy-sobolev/xpu-test-msvc-simd
May 26, 2026
Merged

Avoid vector calls in SYCL kernels#2693
dmitriy-sobolev merged 1 commit into
mainfrom
dev/dmitriy-sobolev/xpu-test-msvc-simd

Conversation

@dmitriy-sobolev

Copy link
Copy Markdown
Contributor

VS 2026 added vectorization to several algorithms. Let's turn it off to test them in SYCL kernels.

Issue example:

In file included from oneDPL\test\xpu_api\algorithms\alg.sorting\alg.sort\is.sorted\xpu_is_sorted_comp.pass.cpp:15:
In file included from oneDPL\include\oneapi\dpl\algorithm:21:
C:\Program Files\Microsoft Visual Studio\18\Professional\VC\Tools\MSVC\14.50.35717\include\algorithm(243,63): error: SYCL kernel cannot call an undefined function without SYCL_EXTERNAL attribute
  243 |             return const_cast<_Ty*>(static_cast<const _Ty*>(::__std_is_sorted_until_4i(_First, _Last, _Greater)));
      |                                                               ^
C:\Program Files\Microsoft Visual Studio\18\Professional\VC\Tools\MSVC\14.50.35717\include\algorithm(81,23): note: '__std_is_sorted_until_4i' declared here
   81 | const void* __stdcall __std_is_sorted_until_4i(const void* _First, const void* _Last, bool _Greater) noexcept;
      |                       ^
C:\Program Files\Microsoft Visual Studio\18\Professional\VC\Tools\MSVC\14.50.35717\include\algorithm(222,6): note: called by '_Is_sorted_until_vectorized<const int>'
  222 | _Ty* _Is_sorted_until_vectorized(_Ty* const _First, _Ty* const _Last, const bool _Greater) noexcept {
      |      ^
C:\Program Files\Microsoft Visual Studio\18\Professional\VC\Tools\MSVC\14.50.35717\include\algorithm(226,59): error: SYCL kernel cannot call an undefined function without SYCL_EXTERNAL attribute
  226 |         return const_cast<_Ty*>(static_cast<const _Ty*>(::__std_is_sorted_until_f(_First, _Last, _Greater)));
      |                                                           ^
C:\Program Files\Microsoft Visual Studio\18\Professional\VC\Tools\MSVC\14.50.35717\include\algorithm(85,23): note: '__std_is_sorted_until_f' declared here
   85 | const void* __stdcall __std_is_sorted_until_f(const void* _First, const void* _Last, bool _Greater) noexcept;
      |                       ^
C:\Program Files\Microsoft Visual Studio\18\Professional\VC\Tools\MSVC\14.50.35717\include\algorithm(222,6): note: called by '_Is_sorted_until_vectorized<const float>'
  222 | _Ty* _Is_sorted_until_vectorized(_Ty* const _First, _Ty* const _Last, const bool _Greater) noexcept {
      |      ^
2 errors generated.

Similar PR: #766.

@dmitriy-sobolev dmitriy-sobolev added the test Test only Change label May 26, 2026

@SergeyKopienko SergeyKopienko 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

@dmitriy-sobolev dmitriy-sobolev force-pushed the dev/dmitriy-sobolev/xpu-test-msvc-simd branch from 4c4ddb3 to b0aa425 Compare May 26, 2026 13:02
@dmitriy-sobolev dmitriy-sobolev merged commit 4dfa0da into main May 26, 2026
23 checks passed
@dmitriy-sobolev dmitriy-sobolev deleted the dev/dmitriy-sobolev/xpu-test-msvc-simd branch May 26, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Test only Change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants