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

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 26 11:11:37 PST 2022


tra added a comment.

In D117137#3269365 <https://reviews.llvm.org/D117137#3269365>, @yaxunl wrote:

> Does that mean only "spirv{64}-unknown-unknown" is acceptable, or "spirv{64}-amd-unknown-unknown" is also acceptable?

My point is that `unknown` part of the triple is a catch-all for `anything, including something invalid` and should not be used for positive checks.
If we do not care about those parts of the triple ( accepting invalid triple would imply it), then we should not check those parts at all. 
Otherwise it leads to a weird inconsistency -- invalid triple like `spirv64-foo-bar`is accepted, but an equally nonsensical triple like `spir64-suse-whatever`which happens to use a known vendor or OS parts is not.

The bottom line is that if there's currently no known use of the vendor/OS/env parts of the triple, then we should not be checking them. 
If we do want to accept specific triple, then appropriate enums should be used/added.


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