Skip to content

[SYCL] Replace direct builtins-side multi_ptr usage with forward-declaration#21687

Merged
againull merged 6 commits intointel:syclfrom
koparasy:compile-time/remove-multi-ptr-from-builtins
Apr 10, 2026
Merged

[SYCL] Replace direct builtins-side multi_ptr usage with forward-declaration#21687
againull merged 6 commits intointel:syclfrom
koparasy:compile-time/remove-multi-ptr-from-builtins

Conversation

@koparasy
Copy link
Copy Markdown
Contributor

@koparasy koparasy commented Apr 6, 2026

sycl/builtins.hpp> no longer needs to include the full <sycl/multi_ptr.hpp> definition. Preserve multi_ptr builtin behavior once multi_ptr.hpp is included, and update include-deps / regression coverage.

On a TU including only <sycl/builtins.hpp> we observe 3.5% reduction for host compilation and 21.7% reduction for device compilation.

@koparasy koparasy requested a review from a team as a code owner April 6, 2026 17:13
@koparasy koparasy requested a review from slawekptak April 6, 2026 17:13
@koparasy koparasy changed the title Replace direct builtins-side multi_ptr usage with forward-declaration [SYCL] Replace direct builtins-side multi_ptr usage with forward-declaration Apr 6, 2026
@koparasy
Copy link
Copy Markdown
Contributor Author

koparasy commented Apr 7, 2026

PR Note (Breaking Change Awareness)

This change removes a transitive include of sycl/multi_ptr.hppfromsycl/builtins.hpp`.

As a result, code that previously relied on including sycl/builtins.hpp to implicitly obtain the definition of multi_ptr may no longer compile. Such usage was relying on an implementation detail rather than an explicit dependency.

Impact:

Source-breaking for applications that depend on transitive inclusion of multi_ptr.
No functional/runtime behavior changes.

Recommended fix for users:

Explicitly include sycl/multi_ptr.hpp where multi_ptr is used.
#include <sycl/multi_ptr.hpp>

Question for reviewers:

Should we:
(a) Treat this as an acceptable cleanup (users fix includes)
(b) Any suggestions?

@KornevNikita
Copy link
Copy Markdown
Contributor

(a) Treat this as an acceptable cleanup (users fix includes)

Applications shouldn't use individual headers, but sycl.hpp. I don't think it's an issue.

Comment thread sycl/include/sycl/multi_ptr.hpp
koparasy added 6 commits April 9, 2026 09:53
…lper

customization points so <sycl/builtins.hpp> no longer needs to include the
full <sycl/multi_ptr.hpp> definition. Preserve multi_ptr builtin behavior once
multi_ptr.hpp is included, and update include-deps / regression coverage.

On a TU including only <sycl/builtins.hpp> we observe 3.5% reduction for host compilation and 21.7% reduction for
device compilation.
@koparasy koparasy force-pushed the compile-time/remove-multi-ptr-from-builtins branch from 7e36c5d to 94a4cfc Compare April 9, 2026 17:04
@github-actions
Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

@againull againull merged commit 9c1cb8a into intel:sycl Apr 10, 2026
66 of 69 checks passed
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