yaxunl added a comment.

>> So, the question is -- what's the right way to specify something like this 
>> in a consistent manner? 
>> `--offload` option proposed here does not seem to be a good fit. It was 
>> intended as a more flexible way to create a single `-cc1` sub-compilation 
>> and we're doing quite a bit more here.
>
> Does `--offload-arch=spirv*` fit better here? If I understand the goal of 
> this patch correctly, it tries to provide controls for changing offload 
> target for HIP application from default (AMDGCN) to SPIR-V.

`--offload-arch=` only accepts GPU arch which is translated to processor option 
(-mcpu= or -march=) in clang -cc1. spirv is a target triple which is not 
suitable for `--offload-arch=`.

`--offload=` is supposed to cover both target triple and processor with some 
flexibility. If only target triple is specified, it assumes default processor. 
If only processor is specified, it deduces target triple. It also allows both 
triple and processor. In this case, `--offload=spirv` translates to -triple 
spirv -mcpu=generic.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110622

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to