This is an archive of the discontinued LLVM Phabricator instance.

Use nvptxcompile library.
Needs ReviewPublic

Authored by tra on Mar 7 2023, 3:21 PM.

Diff Detail

Event Timeline

tra created this revision.Mar 7 2023, 3:21 PM
This revision was not accepted when it landed; it landed in state Draft.Mar 17 2023, 2:14 PM
Closed by commit rG5f66348e59aa: Use nvptxcompile library. (authored by tra). · Explain Why
This revision was automatically updated to reflect the committed changes.
jdoerfert reopened this revision.Apr 27 2023, 1:37 PM
jdoerfert added a subscriber: jdoerfert.

is this still supposed to land?

tra added a comment.Apr 27 2023, 2:04 PM

is this still supposed to land?

It's up to MLIR folks.

I did this patch as a prototype when I was trying to decouple MLIR compilation passes from hard dependency on NVIDIA GPU driver. The hard dependency has been sufficiently mitigated w/o this patch.

@tra : do you have thoughts on nvptxcompiler library vs "writing out a temp file and shelling out invoke ptxas" ?

tra added a comment.Aug 7 2023, 2:07 PM

@tra : do you have thoughts on nvptxcompiler library vs "writing out a temp file and shelling out invoke ptxas" ?

The main benefit is that it makes things more hermetic. Less of a chance that things would go wrong due to the end-user setup (e.g. no space in /tmp, picking up wrong ptxas). Easier to reproduce issues when we need to -- official builds would be guaranteed to use the same PTX compiler as the end user.
If there's a bug in the ptxas compiler, we only need to rebuild with the fixed library. It gives clear idea which version is broken and which is fixed. With ptxas the answer would depend on the specific set up for the individual user, which makes triaging/support much more of a hassle.