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

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 12:00:44 PDT 2022


tra added a comment.

I agree, with caveats, that in general LLVM should not depend on proprietary tools.
I'm also potentially biased as I'm one of the primary beneficiaries of these changes.

It's unfortunate that we both do want to verify that LLVM produces valid output and are unable to do so 
without `ptxas`, as it is the ultimate consumer of the LLVM output and is the source of the ground truth when it comes to the validity of PTX syntax.

Without this patch, the only choice we have is to land NVPTX back-end changes with limited testing for what *we* think is a valid PTX. 
`ptxas` does not always agree. In order to verify correctness of the PTX we do need to feed the generated PTX to `ptxas`. 
Right now it has to be done manually. I frequently ask contributors to do that during code reviews and it did allow us to spot some errors early. 
We've also discovered a handful of old errors by running the tests introduced by this patch.

We do have bots running CUDA test-suite, but they are mostly concerned with front-end being functional for 
various combinations of GPU, CUDA version, and the standard C++ library used. 
These tests are not particularly well-suited for verifying syntax of wide range of instructions we generate.

We could've set up yet another CPU-only buildbot for running `ptxas` compilation tests. 
I actually do plan to do that, and having this patch allows doing that relatively easily.
That would still be removed from the LLVM commits that introduce the changes in PTX output.
Developers would still have to do their own tests manually and we would still need some sort of solution for that.


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