Skip to content

[SYCL] Split detail builtins implementation into internal headers#21835

Merged
againull merged 7 commits into
intel:syclfrom
koparasy:compile-time/split-builtins
May 11, 2026
Merged

[SYCL] Split detail builtins implementation into internal headers#21835
againull merged 7 commits into
intel:syclfrom
koparasy:compile-time/split-builtins

Conversation

@koparasy
Copy link
Copy Markdown
Contributor

@koparasy koparasy commented Apr 21, 2026

Refactors builtins.hpp into a thin hub plus builtin_helpers.hpp and per-category internal headers.
Intended to improve header organization and introduce opportunities for reducing compile-time cost.

Implements the builtin_*.hpp files listed in KhronosGroup/SYCL-Docs#814

@koparasy koparasy force-pushed the compile-time/split-builtins branch 4 times, most recently from b5fe38f to ead3afc Compare April 29, 2026 22:10
@koparasy koparasy changed the title [SYCL][NFCI] Split detail builtins implementation into internal headers [SYCL] Split detail builtins implementation into internal headers Apr 29, 2026
@koparasy koparasy marked this pull request as ready for review April 29, 2026 22:12
@koparasy koparasy requested a review from a team as a code owner April 29, 2026 22:12
@koparasy koparasy requested a review from againull April 29, 2026 22:12
@koparasy
Copy link
Copy Markdown
Contributor Author

@0x12CC This should be the last part on my side.

@koparasy koparasy force-pushed the compile-time/split-builtins branch from 22a9973 to 656ba9b Compare April 29, 2026 22:33
Refactors builtins.hpp into a thin hub plus builtin_helpers.hpp
and per-category internal headers. Intended to improve header
organization and introduce opportunities for reducing compile-time cost.

Introduces KHR inclusion points to the fine grain includes
@koparasy koparasy force-pushed the compile-time/split-builtins branch from b818b08 to 6ffb7e6 Compare April 29, 2026 22:37
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.

I've noticed that KhronosGroup/SYCL-Docs#814 is not merged yet, is it finalized or should we wait for it to be finalized/merged?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

AFAIK it has not been finalized, correct. It waits for the CTS tests and we already have most of the implementation there.

The implementation here should not affect non-users.

@0x12CC @gmlueck any comments on this?

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.

We have a process for this documented here: https://github.com/intel/llvm/blob/sycl/sycl/doc/developer/KHRExtensions.md. I'm not sure if it's applicable to this specific extension since the only way to use it is to include it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok. At this point and for this KHR I don't believe this is feasible/wise. The KHR is big in the first place (it needs to implement all the new headers) and we already have many headers pushed under that KHR. So I think we should merge this in (once we resolve comments etc.).

The changes under the sycl/detail/ are nice to have regardless of the KHR while splitting builtins into multiple headers under sycl will be beneficial cause it will enable us to internally include less files.

(void)sycl::half_precision::divide(A, B);
(void)sycl::half_precision::divide(MA, MB);
return 0;
} No newline at end of file
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.

Could you please fix EOL issues

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did, but now code formatter fails on these.

Comment thread sycl/include/sycl/builtins_common.hpp Outdated
Comment thread sycl/test/regression/khr_includes_builtins_common.cpp Outdated
@koparasy koparasy requested a review from againull May 11, 2026 15:55
@againull againull merged commit d0f66db into intel:sycl May 11, 2026
46 of 47 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