Document the -fsycl-targets flag
clang++ --help says very little about -fsycl-targets:
-fsycl-targets=<value> Specify comma-separated list of triples SYCL offloading targets to be supported
Digging through some code, documentation, and -sycl-help I found five possible targets:
spir64-unknown-unknown-sycldevice: OpenCL backend (default target ?)spir64_gen-unknown-unknown-sycldevice: OpenCL backend, with ahead-of-time compilation for Intel NEO driver and Gen "X" GPUs (viaocloc)spir64_x86_64-unknown-unknown-sycldevice: OpenCL backend, with ahead-of-time compilation for Intel CPUs (viaopencl-aot)spir64_fpga-unknown-unknown-sycldevice: OpenCL backend, with ahead-of-time compilation for Intel FPGAs (viaaoc)nvptx64-nvidia-cuda-sycldevice: CUDA backend
Is there a way to list all supported targets ?
Does it make any difference if one uses e.g. spir64-unknown-unknown-sycldevice or spir64-unknown-linux-sycldevice ?
In fact, it looks like nvptx64---sycldevice and spir64---sycldevice work just as well ?
Is there a way to list all supported targets ? For example -fsycl-targets=list to see all supported options
In view of the extensive existing documentation at https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top.html, I would suggest re-assessing whether the issue is still relevant.
In view of the extensive existing documentation at https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top.html, I would suggest re-assessing whether the issue is still relevant.
I think this only documents the targets available in the official releases. In theory, one could build from source with a different set of targets (e.g. nvptx64-nvidia-cuda).
Hi! There have been no updates for at least the last 60 days, though the ticket has assignee(s).
@mdtoguchi, could I ask you to take one of the following actions? :)
- Please provide an update if you have any (or just a small comment if you don't have any yet).
- OR mark this issue with the 'confirmed' label if you have confirmed the problem/request and our team should work on it.
- OR close the issue if it has been resolved.
- OR take any other suitable action.
Thanks!
Hi! There have been no updates for at least the last 60 days, though the issue has assignee(s).
@mdtoguchi, could you please take one of the following actions:
- provide an update if you have any
- unassign yourself if you're not looking / going to look into this issue
- mark this issue with the 'confirmed' label if you have confirmed the problem/request and our team should work on it
- close the issue if it has been resolved
- take any other suitable action.
Thanks!
At least for builds made from intel/llvm sources, list of available targets and more detailed documentation for the -fsycl-targets can be found in our User Manual
Does it make any difference if one uses e.g.
spir64-unknown-unknown-sycldeviceorspir64-unknown-linux-sycldevice?
Since that issue was reported we have completely dropped sycldevice suffix and you can now omit unknown-unknown part of the triple as well. Most likely we ignore those elements of the triple, but recommendation would be not to put anything random in them and instead just use a shortcut spir64.
Is there a way to list all supported targets ? For example
-fsycl-targets=listto see all supported options
@mdtoguchi, do you think that is something we can implement? I'm not entirely sure how -fsycl-targets is implemented and whether we do any early validation of it
For -fsycl-targets we do some validation of the targets given so it would not be a stretch to see if we can emit some information that provides a list of valid targets. We would just need to find a reasonable option to emit the output.
I think that the documentation part of the question can be considered resolved. I've outlined the request to add a way to display all possible targets through a flag into #15641 to track it separately. Having that said, I'm going to close the issue as complete, but please let us know if there are still questions/comments/concerns about anything