Also get rid of explicitly specified '-march' values for old architectures.
This simplifies %ptxas-verify statements.
After the change, we can potentially miss cases where a new functionality
is added to the architecture without appropriate checks in the
backend. On the other hand, this is mostly true for old architectures
that have been thoroughly tested.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/test/lit.cfg.py | ||
---|---|---|
239 | This will be a problem for cases where we generate PTX for a newer GPU variants. |
llvm/test/lit.cfg.py | ||
---|---|---|
239 | 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. |
LGTM.
llvm/test/lit.cfg.py | ||
---|---|---|
239 | It may be a good idea to update lit docs and document that the default for #ptxas/%ptxas-verify is sm_60 now. |
llvm/test/lit.cfg.py | ||
---|---|---|
239 | I'd like to document this, but it's not clear where to put comments exactly. I added them to llvm/test/lit.cfg.py. Is that OK? |
it's not clear where to put comments exactly. I added them to llvm/test/lit.cfg.py. Is that OK?
I don't have any better ideas. lit.cfg.py seems to be a reasonable place for it.
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.