Skip to content

[SYCL][Driver][Test] Remove unnecessary 'sysroot' usage in driver lit tests - #23478

Open
jinge90 wants to merge 4 commits into
intel:syclfrom
jinge90:remove_unnecessary_sysroot
Open

jinge90 wants to merge 4 commits into
intel:syclfrom
jinge90:remove_unnecessary_sysroot

Conversation

@jinge90

@jinge90 jinge90 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

We added '--sysroot=%S/Inputs/SYCL' to SYCL driver lit tests to locate dummy devicelibs to remove dependency on building libdevice. Some of the additions are not needed in fact, this PR cleans up these redundant sysroot usage.
The updated tests can be categorized into:

  1. use -ccc-print-phases in command to dump action graph only, no devicelib lookup happen:
    sycl-int-header-footer, sycl-preprocess and phase lines in sycl-offload*
  2. Driver error before jobs are built. These are not lines that check option validation: invalid or unknown target, bad option value, bad --offload-arch, incompatible option, empty -fsycl-host-compiler=, and so on. The driver stops right after the diagnostic.
    sycl-offload.cpp 10–110, 551, 553. sycl-ftarget-register-alloc-mode; sycl-host-compiler; sycl-lto; sycl-fsyclbin
  3. Object or archive input only, no source file. The driver doesn't compile anything for the device. The device link is passed to clang-linker-wrapper, and the checks only look at its options.
    sycl-option-ownership, sycl-offload.cpp 661–690. sycl-offload-new-driver.cpp:171, sycl-spirv-obj.cpp:39
  4. SYCLBIN inputs or -fsycl-link of .syclbin. There's no device compile, and the checks are on the syclbin link commands.
    sycl-syclbin-link
  5. --no-offloadlib already given. Device libraries are turned off.
    sycl-offload-save-temps, sycl-offload-with-split, sycl-save-offload-code
  6. Stops before the device compile. -E, -fsycl-device-only/--offload-device-only with phases, or -fsycl-help.
    sycl-syclbin-link, sycl-offload
  7. Empty -fsycl-targets=. No device toolchain is created; only a warning is checked.
    sycl-offoad.cpp

Build clang and related tools required by running clang driver tests and run all driver tests, all updated tests passed without build libdevice binaries.

@jinge90
jinge90 requested a review from a team as a code owner October 14, 2026 08:02
@jinge90
jinge90 marked this pull request as draft October 14, 2026 08:36
@jinge90
jinge90 marked this pull request as ready for review October 15, 2026 07:42
@jinge90 jinge90 changed the title [Driver][Test] Remove unnecessary 'sysroot' usage in driver lit tests [SYCL][Driver][Test] Remove unnecessary 'sysroot' usage in driver lit tests Oct 15, 2026
@jinge90

jinge90 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

Hi, @mdtoguchi
Could you help review this PR?
Thanks very much.

This branch has not been deployed

No deployments
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.

1 participant