[PATCH] D155851: [llvm][nvptx] Add sm_90a

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 10:16:30 PDT 2023


tra added a comment.

It's unfortunate that NVIDIA decided to break existing naming convention. :-/

> PTX code generated for such targets cannot be run on later generation devices. Architecture-accelerated features can only be used with targets that support these features.

We do have a number of places where we compare SM values, so adding support for sm90a will require changing the way we encode SM version and the way we determine availability of various instructions/intrinsics/builtins. Properly implementing it will be a bit of a pain.

This patch effectively makes sm_90a a synonym for sm_90, only with additional constraint of requiring PTX 8.0.

It does not hurt, but it also does not do anything you would not be able to do by specifying sm_90 and ptx80 manually. Do you really need this change? Or do you plan making further changes to fully implement support for sm_90a?



================
Comment at: llvm/lib/Target/NVPTX/NVPTX.td:44
 
+def SM90a: FeatureSM<90>;
 //===----------------------------------------------------------------------===//
----------------
Nit: I'd move it up to where we define other `SMxx` records.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155851/new/

https://reviews.llvm.org/D155851



More information about the llvm-commits mailing list