[PATCH] D121727: [NVPTX] Integrate ptxas to LIT tests

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 18 15:09:44 PDT 2022


tra added a comment.

In D121727#3392973 <https://reviews.llvm.org/D121727#3392973>, @probinson wrote:

> 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.

As you've mentioned, we'll need to do it for all the 200 or so tests we potentially want to use ptxas on.


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