[PATCH] D121727: [NVPTX] Integrate ptxas to LIT tests
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 18 11:25:10 PDT 2022
probinson added a comment.
What I've seen done in other cases is to write a second test file that uses the first test file as input. This lets the second test file have different requirements than the first. In the example here, you wouldn't modify `access-non-generic.ll` but rather add a second file, say `access-non-generic-ptxas.ll` that contained just this:
REQUIRES: ptxas
RUN: llc < access-non-generic.ll -march=nvptx -mcpu=sm_20 -o %t.ptx
RUN: ptxas -c %t.ptx -o /dev/null
The upside is, this uses existing lit mechanisms (feature test based on discovery of "ptxas" on PATH, or some environment variable is set).
The downside is, a bit more effort to keep the two files consistent; although in this case, it looks like the "ptxas" commands are pretty simple so I shouldn't think it would be a real burden.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121727/new/
https://reviews.llvm.org/D121727
More information about the llvm-commits
mailing list