device-compiler pipeline#22311
Conversation
| `-Xoffload-compiler<triple> <arg>`: | ||
| Pass `<arg>` to the offload compilers or the ones identified by `-<triple>` | ||
|
|
||
| Open #1: is `Xsycl-target` intended for the same purpose as `-Xoffload-compiler`? Should we deprecate `Xsycl-target` in favor of `-Xoffload-compiler`? |
There was a problem hiding this comment.
We probably should or atleast start a proposal to do so in future. Two flags that do the same thing is a bit confusing.
| So the actual command the driver builds (visible with `clang++ -###`) looks like: | ||
|
|
||
| ``` | ||
| clang-linker-wrapper --host-triple=x86_64-unknown-linux-gnu \ |
There was a problem hiding this comment.
Question: In the stage1 command, it was like this:
clang++ -fopenmp --offload-arch=gfx90a -Xoffload-compiler -ffast-math foo.cpp
gfx90a is a AMD GPU right? So how did it get translated to nvptx64-nvidia-cuda?
There was a problem hiding this comment.
examples were created by claude, I don't think they match, all this are illustrative for discussion. Feel free to update to specific options, if you feel it is useful.
|
|
||
| Open #1: is `Xsycl-target` intended for the same purpose as `-Xoffload-compiler`? Should we deprecate `Xsycl-target` in favor of `-Xoffload-compiler`? | ||
|
|
||
| Open #2: Per https://www.intel.com/content/www/us/en/docs/dpcpp-cpp-compiler/developer-guide-reference/2025-1/xsycl-target.html , it seems `-Xsycl-target-backend` |
There was a problem hiding this comment.
you can do something like that: clang++ ... -flto ... -Xsycl-target-backend="..." "-ocloc_option"
Then in current downstream implementation, it will translate to something like this:
--device-compiler=pisa="-flto" --device-compiler=spirv="-ocloc_option"
-flto is intended for clang++, -ocloc_option is inteded for ocloc. This is the problem.
No description provided.