Refactor SYCL flag handling for host and device compilation #5062
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 279 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.337
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5062"
general
weight: 0.35
tahonermann
Motivation
PR #2994 removed
-fsycl-host-compilerand enabled pureicpxcompilation for SYCL kernels. Host flags were initially merged into the SYCL compiler flags becauseicpxcompiles both host and device code.However, host and device compilation may require different options. For example, a Debug build may use
-O0 -gfor host code while keeping device code optimized without debug information. Passing all flags through one list prevents such configurations and may incorrectly apply host-only options to the device frontend.This PR separates host flags from common/device flags. Host options are forwarded individually with
-Xarch_host, whileSYCL_COMPILE_FLAGScontains only common and device compilation options.Additional warning fixes
Forwarding the complete host flag set to the
icpxhost frontend exposed three additional categories of warnings.GCC-only warning options
Some warning options inherited from PyTorch are supported by GCC but not by the Intel SYCL/Clang host frontend. Passing them through
-Xarch_hostproduced anunknown-warning-optiondiagnostic for every SYCL translation unit.These options are now excluded only when constructing the
icpxcommand. They remain available to regular sources compiled by GCC.SYCL-TLA third-party warnings
The Clang host frontend reports additional warnings in the third-party SYCL-TLA/CUTLASS headers. With
WERROR=1, those warnings prevented the SYCL-TLA target from compiling.The affected diagnostics are demoted with
-Wno-error=*only for thetorch-xpu-ops-sycltlatarget. They remain visible as warnings, and other SYCL targets are unaffected.Host-pass source diagnostics
The Clang host pass also detected warnings in torch-xpu-ops sources that were not reported by the previous GCC host compiler.
These were fixed locally instead of disabling their warning classes globally: