Skip to content

[SYCL] Clean up handler.hpp transitive include chain#22147

Open
koparasy wants to merge 2 commits into
intel:syclfrom
koparasy:sycl-handler-compile-time-cleanup
Open

[SYCL] Clean up handler.hpp transitive include chain#22147
koparasy wants to merge 2 commits into
intel:syclfrom
koparasy:sycl-handler-compile-time-cleanup

Conversation

@koparasy
Copy link
Copy Markdown
Contributor

Drop dead/unnecessary includes from handler.hpp and its dependency chain to reduce compile-time overhead and improve header hygiene. No ABI or API changes.

Changes:

  • Split tls_code_loc_t and code_location into a new sycl/detail/code_location.hpp; common.hpp no longer carries them. Files that relied on the transitive pull now include code_location.hpp directly (accessor.hpp, buffer.hpp, buffer_impl.{hpp,cpp}, common.cpp, usm_impl.hpp, layout_tls_code_loc_t.cpp).
  • Drop 14 unused includes from cg_types.hpp; kept only kernel_handler.hpp plus required std headers.
  • Drop unused graph.hpp and compile_time_kernel_info.hpp from kernel_launch_helper.hpp.
  • Replace device.hpp with class fwd-decl in range_rounding.hpp; only const device& is used.
  • Drop unused includes from handler.hpp: cluster_group_prop.hpp, use_root_sync_prop.hpp, detail/ur.hpp, detail/string.hpp, .
  • Replace common.hpp with code_location.hpp in handler.hpp.
  • Add explicit host_profiling_info.hpp to host_task.hpp (was transitive).

E2E test fixes:

  • Tests using parallel_for_work_item relied on cg_types.hpp transitively pulling h_item.hpp. Add explicit <sycl/h_item.hpp> to: HierPar/hier_par_basic.cpp, HierPar/hier_par_indirect.cpp, HierPar/Inputs/hier_par_wgscope_impl.hpp, InorderQueue/in_order_kernels.cpp, Properties/cache_config.cpp, MemorySanitizer/local/parallel_for_work_group.cpp.

Drop dead/unnecessary includes from handler.hpp and its dependency chain
to reduce compile-time overhead and improve header hygiene. No ABI or API
changes.

Changes:
* Split tls_code_loc_t and code_location into a new
  sycl/detail/code_location.hpp; common.hpp no longer carries them.
  Files that relied on the transitive pull now include code_location.hpp
  directly (accessor.hpp, buffer.hpp, buffer_impl.{hpp,cpp}, common.cpp,
  usm_impl.hpp, layout_tls_code_loc_t.cpp).
* Drop 14 unused includes from cg_types.hpp; kept only kernel_handler.hpp
  plus required std headers.
* Drop unused graph.hpp and compile_time_kernel_info.hpp from
  kernel_launch_helper.hpp.
* Replace device.hpp with class fwd-decl in range_rounding.hpp; only
  const device& is used.
* Drop unused includes from handler.hpp: cluster_group_prop.hpp,
  use_root_sync_prop.hpp, detail/ur.hpp, detail/string.hpp, <tuple>.
* Replace common.hpp with code_location.hpp in handler.hpp.
* Add explicit host_profiling_info.hpp to host_task.hpp (was transitive).

E2E test fixes:
* Tests using parallel_for_work_item relied on cg_types.hpp transitively
  pulling h_item.hpp. Add explicit <sycl/h_item.hpp> to:
  HierPar/hier_par_basic.cpp, HierPar/hier_par_indirect.cpp,
  HierPar/Inputs/hier_par_wgscope_impl.hpp,
  InorderQueue/in_order_kernels.cpp, Properties/cache_config.cpp,
  MemorySanitizer/local/parallel_for_work_group.cpp.
@koparasy koparasy requested review from a team as code owners May 28, 2026 01:33
@koparasy koparasy requested a review from sergey-semenov May 28, 2026 01:33
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.

2 participants