[PATCH] D141736: [NVPTX] Use 'sm_60' architecture when expanding %ptxas-verify macro.
Pavel Kopyl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 14 09:17:41 PST 2023
pavelkopyl added inline comments.
================
Comment at: llvm/test/lit.cfg.py:239
tools.extend([ToolSubst('%ptxas', ptxas_executable),
- ToolSubst('%ptxas-verify', '{} -c -o /dev/null -'.format(
+ ToolSubst('%ptxas-verify', '{} -arch=sm_60 -c -o /dev/null -'.format(
ptxas_executable))])
----------------
tra wrote:
> This will be a problem for cases where we generate PTX for a newer GPU variants.
> At the very least users need to be able to override `-arch=...` passed to ptxas-verify.
>
>
>
I agree, but I guess overriding shouldn't be a problem. For example,
```
%{ llc < %s -march=nvptx63 -mcpu=sm_80 | %ptxas-verify -arch=sm_80 %}
```
gets expanded into:
```
... | /usr/local/cuda-12/bin/ptxas -arch=sm_60 -c - -arch=sm_80
```
Ptxas warns on that:
"ptxas warning : incompatible redefinition for option 'gpu-name', the last value of this option was used".
So, the last
```
-arch=...
```
option has a precedence over the previous ones. This is what we need. The warning message is dropped by /dev/null.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141736/new/
https://reviews.llvm.org/D141736
More information about the llvm-commits
mailing list