Skip to content

[SYCL][Driver] Add option to specify the location of ocloc - #22912

Open
mdtoguchi wants to merge 6 commits into
intel:syclfrom
mdtoguchi:ocloc-location
Open

[SYCL][Driver] Add option to specify the location of ocloc#22912
mdtoguchi wants to merge 6 commits into
intel:syclfrom
mdtoguchi:ocloc-location

Conversation

@mdtoguchi

@mdtoguchi mdtoguchi commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The ocloc tool used for ahead of time compilation targeting Intel GPUs is
acquired externally, so it is not guaranteed to be placed in the PATH.
Add --ocloc-path=dir, allowing a user to specify the directory in which
ocloc resides. The user provided location always wins over any ocloc that
is otherwise visible via the program paths or the PATH environment
variable.

The option is honored for both the old and the new offloading model

  • Old model: the driver's Intel GPU backend compile job (SYCL.cpp) and
    the ocloc help emitted for -fsycl-help=gen.
  • New model: forwarded to clang-linker-wrapper, and to clang-sycl-linker
    for the --sycl-link path. Both tools also accept --ocloc-path=
    directly for standalone use.

Some new offload model tests within sycl-offload-jit.cpp will fail when
the corresponding device libraries are not built.  In those cases, the
test needs to pick up the internal variants so the driver does not error
due to not finding any.
The ocloc tool used for ahead of time compilation targeting Intel GPUs is
acquired externally, so it is not guaranteed to be placed in the PATH.
Add --ocloc-path=<dir>, allowing a user to specify the directory in which
ocloc resides.  The user provided location always wins over any ocloc that
is otherwise visible via the program paths or the PATH environment
variable.

The option is honored for both the old and the new offloading model:

 - Old model: the driver's Intel GPU backend compile job (SYCL.cpp) and
   the ocloc help emitted for -fsycl-help=gen.
 - New model: forwarded to clang-linker-wrapper, and to clang-sycl-linker
   for the --sycl-link path.  Both tools also accept --ocloc-path=
   directly for standalone use.
@mdtoguchi mdtoguchi changed the title Ocloc location [SYCL][Driver] Add option to specify the location of ocloc Aug 10, 2026
@mdtoguchi
mdtoguchi marked this pull request as ready for review August 11, 2026 01:11
@mdtoguchi
mdtoguchi requested review from a team as code owners August 11, 2026 01:11
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