[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

Henry Linjamäki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 15 01:22:11 PDT 2021


linjamaki added a subscriber: yaxunl.
linjamaki added a comment.



> Thanks for the clarifications. So it seems that you are not expecting that the device target triple is being explicitly passed anywhere then and that means you pass the device triple implicitly?

We are meaning to use the `--offload` as a way to pass device target triple explicitly.

> Although your `--offload` option does seem conceptually like a device target triple, so I wonder if better naming for it would be `--offload-target`? Would it work for you if we introduce SPIR-V triple explicitly and you use it as a device offload triple?

To introduce a way to pass a device target triple in HIP compilation, we decided it to be aligned with the envisioned “Unified Offload Option” feature [1] to avoid overlap with similar concept. The design of the feature is pending. AFAIK, @yaxunl, who is working on it, hasn't got time yet to continue the work. In D110622 <https://reviews.llvm.org/D110622> we propose adding the `--offload` option as partial implementation and there is a bit of discussion about the design too.

> It would probably makes sense to use the same triple to targeting SPIR-V generation by everyone?

Yes, it makes sense.

> However I appreciate that OpenCL flow would be somewhat different since it doesn't have a split into host and device but only contains device compilation phase...

The split is specific to offloading languages (such as CUDA, HIP and OpenMP) whose compilation flow is different from the traditional compilation flow. The traditional compilation flow used for non-offloading languages naturally does not have the host/device compilation split.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109144/new/

https://reviews.llvm.org/D109144



More information about the llvm-commits mailing list