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

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 13:28:04 PDT 2022


tra added a comment.

In D121727#3387119 <https://reviews.llvm.org/D121727#3387119>, @asavonic wrote:

> The idea is to add ptxas RUN lines to existing ~200 LIT tests (see access-non-generic.ll as an example). Since we cannot add `REQUIRES: ptxas` to all of them, we can make these new checks optional.

Ah. I see.  Being able to verify that the generated PTX produced by existing tests does get assembled would be useful.

> ... Unfortunately, I don't see any other way to reuse the existing tests and RUN lines.

Ideally we'd want lit to provide a way to make some RUN lines conditional on available features, so we could run more tests when we can, without having to rewrite the file.
And we don't have anything like that.

That said, I'm still not quite happy about substituting it with 'true'. 
Perhaps we can do it slightly differently:

- do not run RUN lines with `ptxas` in them unless the feature is available, and
- document this auto-disabled behavior of `ptxas` in LLVM's lit docs.

This should give us more consistent behavior. E.g. if someone writes a test checking ptxas output with `FileCheck`, it would still work consistently. Replacing ptxas with true would cause the test to fail in this scenario, because the RUN line would still be executed and FileCheck would expect to see the output.
It's not quite like predicating RUN lines based on available features, but it would be close enough to be usable in this case. Combined with documentation that may do.


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