llvm icon indicating copy to clipboard operation
llvm copied to clipboard

Document the -fsycl-targets flag

Open fwyzard opened this issue 5 years ago • 5 comments

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 (via ocloc)
  • spir64_x86_64-unknown-unknown-sycldevice: OpenCL backend, with ahead-of-time compilation for Intel CPUs (via opencl-aot)
  • spir64_fpga-unknown-unknown-sycldevice: OpenCL backend, with ahead-of-time compilation for Intel FPGAs (via aoc)
  • 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 ?

fwyzard avatar Feb 26 '20 08:02 fwyzard

In fact, it looks like nvptx64---sycldevice and spir64---sycldevice work just as well ?

fwyzard avatar Feb 26 '20 08:02 fwyzard

Is there a way to list all supported targets ? For example -fsycl-targets=list to see all supported options

shssf avatar Aug 24 '20 22:08 shssf

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.

AGindinson avatar Jan 26 '22 09:01 AGindinson

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).

mirenradia avatar Nov 23 '22 17:11 mirenradia

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!

KornevNikita avatar May 17 '24 11:05 KornevNikita

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!

github-actions[bot] avatar Jul 17 '24 00:07 github-actions[bot]

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-sycldevice or spir64-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=list to 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

AlexeySachkov avatar Sep 10 '24 09:09 AlexeySachkov

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.

mdtoguchi avatar Sep 10 '24 21:09 mdtoguchi

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

AlexeySachkov avatar Oct 09 '24 13:10 AlexeySachkov