[PATCH] D59393: [NVPTX] generate correct MMA instruction mnemonics with PTX63+.

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 17:16:06 PDT 2019


tra marked an inline comment as done.
tra added inline comments.


================
Comment at: llvm/test/CodeGen/NVPTX/wmma.py:244
+
 main()
----------------
timshen wrote:
> timshen wrote:
> > Who is supposed to run this script? Can we check-in the result of this script and make them part of the regression tests?
> > 
> > Relatedly, for other backends we have a framework for it. See `llvm/utils/update_llc_test_checks.py`. The generated file looks like `llvm/test/CodeGen/PowerPC/atomics-regression.ll`.
> > 
> > One of the advantages to check-in the generated file is that, and succeeding behavioral changes are reflected in the patch.
> > Who is supposed to run this script?
> 
> I guess I can answer this part - lit. Still, it'd be great to check-in the generated .ll files with RUN lines in them.
The script is executed by the lit which then runs llc with the generated output and checks the resulting PTX.

I'm not convinced that committing generated .ll has much value -- it's in the ballpark of a megabyte of uninteresting boilerplate mostly consisting of enumerating 4- and 8-tuples of arguments and results. Upcoming changes will bring more supported types and will multiply the amount of generated ll without making it any more interesting for humans.

e.g just one function out of *a lot*:

```
declare {<2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>} @llvm.nvvm.wmma.m16n16k16.load.a.row.f16.p3i8(i8 addrspace(3)* %src );

; CHECK-LABEL: .func {{.*}}test_llvm_nvvm_wmma_m16n16k16_load_a_row_f16_p3i8(
define {<2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>} @test_llvm_nvvm_wmma_m16n16k16_load_a_row_f16_p3i8(i8 addrspace(3)* %src ) {
; CHECK: wmma.load.a.sync.aligned.row.m16n16k16.shared.f16
; CHECK: {{{%hh[0-9]+, *%hh[0-9]+, *%hh[0-9]+, *%hh[0-9]+, *%hh[0-9]+, *%hh[0-9]+, *%hh[0-9]+, *%hh[0-9]+}}}
; CHECK: [%rd{{[0-9]+}}]
  %v0 = call {<2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>} @llvm.nvvm.wmma.m16n16k16.load.a.row.f16.p3i8(i8 addrspace(3)* %src );
  ret {<2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>, <2 x half>} %v0;
}

```

It's easy enough to generate or grab the one done by lit -- the name would be right there in the failing command.


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

https://reviews.llvm.org/D59393





More information about the llvm-commits mailing list