[PATCH] D117137: [Driver] Add CUDA support for --offload param

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 25 10:41:28 PST 2022


tra added a comment.

In D117137#3268548 <https://reviews.llvm.org/D117137#3268548>, @linjamaki wrote:

> SPIR-V target requires that the OS and the environment type is unknown (see TargetInfo::AllocateTarget and BaseSPIRTargetInfo).

The problem is that LLVM's triple parser will set `UnknownVendor` for *any* vendor it does not know about. As I've pointed in the previous comment positively checking for an unknown vendor leads to a somewhat odd situation, when a triple "vpirv64-whoknowswhat" will be accepted, but "spirv64-suse" will not, even though both are equally nonsensical as far as spirv is concerned.

If SPIRV needs a vendor-specific treatment, then it probably needs a specific vendor enum for that. `UnknownVendor` is ill-suited for that purpose.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117137



More information about the cfe-commits mailing list