You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL] Make handler.hpp independent from kernel_bundle.hpp (#16012)
I was looking into ways of splitting `sycl.hpp` into different
finer-grained headers (with the intention to propose such split as a KHR
extension/SYCL-Next thing) and I decided to try and see what is the
impact of different header files on the compilation time.
I started my investigation with `kernel_bundle.hpp`. Looking at
[zjin-lcf/HeCBench](https://github.com/zjin-lcf/HeCBench), I do not see
any benchmarks that use it, so it seems like a good candidate for being
an opt-in header.
To do the measurements I decided to drop `#include <kernel_bundle.hpp>`
from `sycl.hpp` and then compare compilation time of two empty files
including `sycl.hpp` (the modified one and the original one).
Apparently, it is not that easy to drop an include, because there are so
many inter-dependencies on it. I succeeded and I see ~200ms device
compilation time improvement when `kernel_bundle.hpp` is not included at
all.
However, for my experiments I made some other hacks which I'm unable to
push into the repo, like dropping backend-specific headers as well.
Specifically, L0 backend interop has `kernel_bundle` as a struct member
of some of input or return types which requires a full definition.
SYCL spec ([6.3.7. Adding a
backend](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_adding_a_backend))
allows backend interop headers to be put into separate headers and I
think that we should actually use this opportunity in the future and
drop them (somehow without many regressions) from `sycl.hpp`.
0 commit comments