[SYCL] Move spinlock out of sycl header tree#22270
Conversation
|
@vmustya This relates to your work. |
|
Failure is unrelated (#18552) |
KseniyaTikhomirova
left a comment
There was a problem hiding this comment.
- could you please elaborate on why do you need to create a separate "internal" directory for headers when we have headers in ./sycl/source/detail?
- could you please check that all includes of spinlock header in tools are correct. I don't see its usage in some of those files.
Headers in I'm not claiming the boundary is fully enforced yet, but I'd rather not add to the detail cross-dependencies, and if the direction seems reasonable, other shared headers could migrate the same way over time
Good catch. Removed it from the ones that it is unused. |
thanks for the clarification. |
Its original location was under sycl/include/, i.e. the installed/public tree. Everything there ends up in the user's installation. This header isn't part of the SYCL spec and, more importantly, isn't reachable from any public entry point: nothing under the public headers transitively includes it. Its use by the runtime and tools is purely an implementation detail, so it belongs in the runtime implementation/tool, not in the installed headers. That's the rule I'm applying. If something is neither specified nor reachable from a public entry point, it shouldn't live in the install directories.
The goal is that the directory tree tells you who consumes a header, so you don't have to read every tools' CMake to discover that dependency. detail/ reads as "runtime-private," which this isn't. That said, I don't want to turn a one-header move into a convention debate. If you'd rather it go in |
Spinlock was a non-user facing header under the
syclinclude directory. Move to the runtime directory.