[llvm] [NVPTX] split long-running wmma.py test into smaller chunks. (PR #72331)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 17:30:00 PST 2023


https://github.com/Artem-B updated https://github.com/llvm/llvm-project/pull/72331

>From 8185966f0a32764f6b63b0acf60c93f06e598b0c Mon Sep 17 00:00:00 2001
From: Artem Belevich <tra at google.com>
Date: Tue, 14 Nov 2023 16:52:43 -0800
Subject: [PATCH 1/2] [NVPTX] split long-running wmma.py test into smaller
 chunks.

---
 llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py |  15 +++
 llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py |  15 +++
 llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py |  15 +++
 llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py |  15 +++
 llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py |  15 +++
 llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py |  15 +++
 llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py |  15 +++
 llvm/test/CodeGen/NVPTX/wmma.py            | 117 +++------------------
 8 files changed, 122 insertions(+), 100 deletions(-)
 create mode 100644 llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py
 create mode 100644 llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py
 create mode 100644 llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py
 create mode 100644 llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py
 create mode 100644 llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py
 create mode 100644 llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py
 create mode 100644 llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py

diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py b/llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py
new file mode 100644
index 000000000000000..f103dd2836f1a10
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py
@@ -0,0 +1,15 @@
+# Check all variants of instructions supported by PTX60 on SM70
+# RUN: %python %s --ptx=60 --gpu-arch=70 > %t-ptx60-sm_70.ll
+# RUN: FileCheck %t-ptx60-sm_70.ll < %t-ptx60-sm_70.ll \
+# RUN:           --check-prefixes=INTRINSICS,M16N16
+# RUN: FileCheck %t-ptx60-sm_70.ll < %t-ptx60-sm_70.ll \
+# RUN:           --check-prefixes=INTRINSICS,NOEXTGEOM,NOINT,NOSUBINT,NOMMA,NODOUBLE,NOALTFLOAT,NOLDMATRIX
+# RUN: llc < %t-ptx60-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx60 \
+# RUN:           | FileCheck %t-ptx60-sm_70.ll
+# RUN: %if ptxas %{                                                       \
+# RUN:   llc < %t-ptx60-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx60 \
+# RUN:           | %ptxas-verify -arch=sm_70                              \
+# RUN: %}
+
+import wmma
+wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py b/llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py
new file mode 100644
index 000000000000000..6c2dffbc1070f83
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py
@@ -0,0 +1,15 @@
+# Check all variants of instructions supported by PTX61 on SM70
+# RUN: %python %s --ptx=61 --gpu-arch=70 > %t-ptx61-sm_70.ll
+# RUN: FileCheck %t-ptx61-sm_70.ll < %t-ptx61-sm_70.ll \
+# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM
+# RUN: FileCheck %t-ptx61-sm_70.ll < %t-ptx61-sm_70.ll \
+# RUN:           --check-prefixes=INTRINSICS,NOINT,NOSUBINT,NOMMA,NODOUBLE,NOALTFLOAT,NOLDMATRIX
+# RUN: llc < %t-ptx61-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx61 \
+# RUN:           | FileCheck %t-ptx61-sm_70.ll
+# RUN: %if ptxas-9.1 %{                                                   \
+# RUN:   llc < %t-ptx61-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx61 \
+# RUN:           | %ptxas-verify -arch=sm_70                              \
+# RUN: %}
+
+import wmma
+wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py b/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py
new file mode 100644
index 000000000000000..5c24676051ab181
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py
@@ -0,0 +1,15 @@
+# Check all variants of instructions supported by PTX63 on SM72
+# RUN: %python %s --ptx=63 --gpu-arch=72 > %t-ptx63-sm_72.ll
+# RUN: FileCheck %t-ptx63-sm_72.ll < %t-ptx63-sm_72.ll \
+# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,INT
+# RUN: FileCheck %t-ptx63-sm_72.ll < %t-ptx63-sm_72.ll \
+# RUN:           --check-prefixes=INTRINSICS,NOSUBINT,NOMMA,NODOUBLE,NOALTFLOAT,NOLDMATRIX
+# RUN: llc < %t-ptx63-sm_72.ll -march=nvptx64 -mcpu=sm_72 -mattr=+ptx63 \
+# RUN:           | FileCheck %t-ptx63-sm_72.ll
+# RUN: %if ptxas-10.0 %{                                                  \
+# RUN:   llc < %t-ptx63-sm_72.ll -march=nvptx64 -mcpu=sm_72 -mattr=+ptx63 \
+# RUN:           | %ptxas-verify -arch=sm_72                              \
+# RUN: %}
+
+import wmma
+wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py b/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py
new file mode 100644
index 000000000000000..6e5df08b8c6994a
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py
@@ -0,0 +1,15 @@
+# Check all variants of instructions supported by PTX63 on SM75
+# RUN: %python %s --ptx=63 --gpu-arch=75 > %t-ptx63-sm_75.ll
+# RUN: FileCheck %t-ptx63-sm_75.ll < %t-ptx63-sm_75.ll \
+# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,INT,SUBINT
+# RUN: FileCheck %t-ptx63-sm_75.ll < %t-ptx63-sm_75.ll \
+# RUN:           --check-prefixes=INTRINSICS,NOMMA,NODOUBLE,NOALTFLOAT,NOLDMATRIX
+# RUN: llc < %t-ptx63-sm_75.ll -march=nvptx64 -mcpu=sm_75 -mattr=+ptx63 \
+# RUN:           | FileCheck %t-ptx63-sm_75.ll
+# RUN: %if ptxas-10.0 %{                                                  \
+# RUN:   llc < %t-ptx63-sm_75.ll -march=nvptx64 -mcpu=sm_75 -mattr=+ptx63 \
+# RUN:           | %ptxas-verify -arch=sm_75                              \
+# RUN: %}
+
+import wmma
+wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py b/llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py
new file mode 100644
index 000000000000000..adaa28bd898173b
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py
@@ -0,0 +1,15 @@
+# Check all variants of instructions supported by PTX64 on SM70+
+# RUN: %python %s --ptx=64 --gpu-arch=70 > %t-ptx64-sm_70.ll
+# RUN: FileCheck %t-ptx64-sm_70.ll < %t-ptx64-sm_70.ll \
+# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,MMA
+# RUN: FileCheck %t-ptx64-sm_70.ll < %t-ptx64-sm_70.ll \
+# RUN:           --check-prefixes=INTRINSICS,NOINT,NOSUBINT,NODOUBLE,NOALTFLOAT,NOLDMATRIX
+# RUN: llc < %t-ptx64-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx64 \
+# RUN:           | FileCheck %t-ptx64-sm_70.ll
+# RUN: %if ptxas-10.1 %{                                                  \
+# RUN:   llc < %t-ptx64-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx64 \
+# RUN:           | %ptxas-verify -arch=sm_70                              \
+# RUN: %}
+
+import wmma
+wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py b/llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py
new file mode 100644
index 000000000000000..11a589625c18579
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py
@@ -0,0 +1,15 @@
+# Check all variants of instructions supported by PTX65 on SM75+
+# RUN: %python %s --ptx=65 --gpu-arch=75 > %t-ptx65-sm_75.ll
+# RUN: FileCheck %t-ptx65-sm_75.ll < %t-ptx65-sm_75.ll \
+# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,INT,SUBINT,MMA,PTX65MMA,PTX65LDMATRIX
+# RUN: FileCheck %t-ptx65-sm_75.ll < %t-ptx65-sm_75.ll \
+# RUN:           --check-prefixes=INTRINSICS
+# RUN: llc < %t-ptx65-sm_75.ll -march=nvptx64 -mcpu=sm_75 -mattr=+ptx65 \
+# RUN:           | FileCheck %t-ptx65-sm_75.ll
+# RUN: %if ptxas-10.2 %{                                                  \
+# RUN:   llc < %t-ptx65-sm_75.ll -march=nvptx64 -mcpu=sm_75 -mattr=+ptx65 \
+# RUN:           | %ptxas-verify -arch=sm_75                              \
+# RUN: %}
+
+import wmma
+wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py b/llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py
new file mode 100644
index 000000000000000..f7af5d6370bc04b
--- /dev/null
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py
@@ -0,0 +1,15 @@
+# Check all variants of instructions supported by PTX71 on SM80+
+# RUN: %python %s --ptx=71 --gpu-arch=80 > %t-ptx71-sm_80.ll
+# RUN: FileCheck %t-ptx71-sm_80.ll < %t-ptx71-sm_80.ll \
+# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,INT,SUBINT,MMA,ALTFLOAT,DOUBLE,PTX65MMA,PTX65LDMATRIX,PTX71MMA
+# RUN: FileCheck %t-ptx71-sm_80.ll < %t-ptx71-sm_80.ll \
+# RUN:           --check-prefixes=INTRINSICS
+# RUN: llc < %t-ptx71-sm_80.ll -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 \
+# RUN:           | FileCheck %t-ptx71-sm_80.ll
+# RUN: %if ptxas-11.1 %{                                                  \
+# RUN:   llc < %t-ptx71-sm_80.ll -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 \
+# RUN:           | %ptxas-verify -arch=sm_80                              \
+# RUN: %}
+
+import wmma
+wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma.py b/llvm/test/CodeGen/NVPTX/wmma.py
index b7153d684671f6c..06d51a541db7521 100644
--- a/llvm/test/CodeGen/NVPTX/wmma.py
+++ b/llvm/test/CodeGen/NVPTX/wmma.py
@@ -1,96 +1,8 @@
 # This test generates all variants of wmma intrinsics and verifies that LLVM
-# generates correct instructions for them.
-
-# Check all variants of instructions supported by PTX60 on SM70
-# RUN: %python %s --ptx=60 --gpu-arch=70 > %t-ptx60-sm_70.ll
-# RUN: FileCheck %t-ptx60-sm_70.ll < %t-ptx60-sm_70.ll \
-# RUN:           --check-prefixes=INTRINSICS,M16N16
-# RUN: FileCheck %t-ptx60-sm_70.ll < %t-ptx60-sm_70.ll \
-# RUN:           --check-prefixes=INTRINSICS,NOEXTGEOM,NOINT,NOSUBINT,NOMMA,NODOUBLE,NOALTFLOAT,NOLDMATRIX
-# RUN: llc < %t-ptx60-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx60 \
-# RUN:           | FileCheck %t-ptx60-sm_70.ll
-# RUN: %if ptxas %{                                                       \
-# RUN:   llc < %t-ptx60-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx60 \
-# RUN:           | %ptxas-verify -arch=sm_70                              \
-# RUN: %}
-
-# Check all variants of instructions supported by PTX61 on SM70
-# RUN: %python %s --ptx=61 --gpu-arch=70 > %t-ptx61-sm_70.ll
-# RUN: FileCheck %t-ptx61-sm_70.ll < %t-ptx61-sm_70.ll \
-# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM
-# RUN: FileCheck %t-ptx61-sm_70.ll < %t-ptx61-sm_70.ll \
-# RUN:           --check-prefixes=INTRINSICS,NOINT,NOSUBINT,NOMMA,NODOUBLE,NOALTFLOAT,NOLDMATRIX
-# RUN: llc < %t-ptx61-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx61 \
-# RUN:           | FileCheck %t-ptx61-sm_70.ll
-# RUN: %if ptxas-9.1 %{                                                   \
-# RUN:   llc < %t-ptx61-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx61 \
-# RUN:           | %ptxas-verify -arch=sm_70                              \
-# RUN: %}
-
-# Check all variants of instructions supported by PTX63 on SM72
-# RUN: %python %s --ptx=63 --gpu-arch=72 > %t-ptx63-sm_72.ll
-# RUN: FileCheck %t-ptx63-sm_72.ll < %t-ptx63-sm_72.ll \
-# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,INT
-# RUN: FileCheck %t-ptx63-sm_72.ll < %t-ptx63-sm_72.ll \
-# RUN:           --check-prefixes=INTRINSICS,NOSUBINT,NOMMA,NODOUBLE,NOALTFLOAT,NOLDMATRIX
-# RUN: llc < %t-ptx63-sm_72.ll -march=nvptx64 -mcpu=sm_72 -mattr=+ptx63 \
-# RUN:           | FileCheck %t-ptx63-sm_72.ll
-# RUN: %if ptxas-10.0 %{                                                  \
-# RUN:   llc < %t-ptx63-sm_72.ll -march=nvptx64 -mcpu=sm_72 -mattr=+ptx63 \
-# RUN:           | %ptxas-verify -arch=sm_72                              \
-# RUN: %}
-
-# Check all variants of instructions supported by PTX63 on SM75
-# RUN: %python %s --ptx=63 --gpu-arch=75 > %t-ptx63-sm_75.ll
-# RUN: FileCheck %t-ptx63-sm_75.ll < %t-ptx63-sm_75.ll \
-# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,INT,SUBINT
-# RUN: FileCheck %t-ptx63-sm_75.ll < %t-ptx63-sm_75.ll \
-# RUN:           --check-prefixes=INTRINSICS,NOMMA,NODOUBLE,NOALTFLOAT,NOLDMATRIX
-# RUN: llc < %t-ptx63-sm_75.ll -march=nvptx64 -mcpu=sm_75 -mattr=+ptx63 \
-# RUN:           | FileCheck %t-ptx63-sm_75.ll
-# RUN: %if ptxas-10.0 %{                                                  \
-# RUN:   llc < %t-ptx63-sm_75.ll -march=nvptx64 -mcpu=sm_75 -mattr=+ptx63 \
-# RUN:           | %ptxas-verify -arch=sm_75                              \
-# RUN: %}
-
-# Check all variants of instructions supported by PTX64 on SM70+
-# RUN: %python %s --ptx=64 --gpu-arch=70 > %t-ptx64-sm_70.ll
-# RUN: FileCheck %t-ptx64-sm_70.ll < %t-ptx64-sm_70.ll \
-# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,MMA
-# RUN: FileCheck %t-ptx64-sm_70.ll < %t-ptx64-sm_70.ll \
-# RUN:           --check-prefixes=INTRINSICS,NOINT,NOSUBINT,NODOUBLE,NOALTFLOAT,NOLDMATRIX
-# RUN: llc < %t-ptx64-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx64 \
-# RUN:           | FileCheck %t-ptx64-sm_70.ll
-# RUN: %if ptxas-10.1 %{                                                  \
-# RUN:   llc < %t-ptx64-sm_70.ll -march=nvptx64 -mcpu=sm_70 -mattr=+ptx64 \
-# RUN:           | %ptxas-verify -arch=sm_70                              \
-# RUN: %}
-
-# Check all variants of instructions supported by PTX65 on SM75+
-# RUN: %python %s --ptx=65 --gpu-arch=75 > %t-ptx65-sm_75.ll
-# RUN: FileCheck %t-ptx65-sm_75.ll < %t-ptx65-sm_75.ll \
-# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,INT,SUBINT,MMA,PTX65MMA,PTX65LDMATRIX
-# RUN: FileCheck %t-ptx65-sm_75.ll < %t-ptx65-sm_75.ll \
-# RUN:           --check-prefixes=INTRINSICS
-# RUN: llc < %t-ptx65-sm_75.ll -march=nvptx64 -mcpu=sm_75 -mattr=+ptx65 \
-# RUN:           | FileCheck %t-ptx65-sm_75.ll
-# RUN: %if ptxas-10.2 %{                                                  \
-# RUN:   llc < %t-ptx65-sm_75.ll -march=nvptx64 -mcpu=sm_75 -mattr=+ptx65 \
-# RUN:           | %ptxas-verify -arch=sm_75                              \
-# RUN: %}
-
-# Check all variants of instructions supported by PTX71 on SM80+
-# RUN: %python %s --ptx=71 --gpu-arch=80 > %t-ptx71-sm_80.ll
-# RUN: FileCheck %t-ptx71-sm_80.ll < %t-ptx71-sm_80.ll \
-# RUN:           --check-prefixes=INTRINSICS,M16N16,EXTGEOM,INT,SUBINT,MMA,ALTFLOAT,DOUBLE,PTX65MMA,PTX65LDMATRIX,PTX71MMA
-# RUN: FileCheck %t-ptx71-sm_80.ll < %t-ptx71-sm_80.ll \
-# RUN:           --check-prefixes=INTRINSICS
-# RUN: llc < %t-ptx71-sm_80.ll -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 \
-# RUN:           | FileCheck %t-ptx71-sm_80.ll
-# RUN: %if ptxas-11.1 %{                                                  \
-# RUN:   llc < %t-ptx71-sm_80.ll -march=nvptx64 -mcpu=sm_80 -mattr=+ptx71 \
-# RUN:           | %ptxas-verify -arch=sm_80                              \
-# RUN: %}
+# generates correct instructions for them. This is the test generator only.  The
+# test scripts themselves are in wmma-ptx*-sm*.py files.
+
+# RUN: true
 
 from __future__ import print_function
 
@@ -98,7 +10,6 @@
 from itertools import product
 from string import Template
 
-
 class MMAType:
     def __init__(self, ptx_type):
         self.ptx_type = ptx_type
@@ -1082,12 +993,18 @@ def gen_tests():
     items += gen_mma_tests()
     gen_check_unsupported_ops(items)
 
+def main():
+    global ptx_version
+    global gpu_arch
+    parser = argparse.ArgumentParser()
+    parser.add_argument("--ptx", type=int, default=60)
+    parser.add_argument("--gpu-arch", type=int, default=70)
+    args = parser.parse_args()
+
+    ptx_version = args.ptx
+    gpu_arch = args.gpu_arch
 
-parser = argparse.ArgumentParser()
-parser.add_argument("--ptx", type=int, default=60)
-parser.add_argument("--gpu-arch", type=int, default=70)
-args = parser.parse_args()
-ptx_version = args.ptx
-gpu_arch = args.gpu_arch
+    gen_tests()
 
-gen_tests()
+if __name__ == "__main__":
+  main()

>From 9d7a6f637529b97920ec62bd07a590c41e0b49ea Mon Sep 17 00:00:00 2001
From: Artem Belevich <tra at google.com>
Date: Tue, 14 Nov 2023 17:29:27 -0800
Subject: [PATCH 2/2] Fixed code formatting

---
 llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py | 1 +
 llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py | 1 +
 llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py | 1 +
 llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py | 1 +
 llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py | 1 +
 llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py | 1 +
 llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py | 1 +
 llvm/test/CodeGen/NVPTX/wmma.py            | 4 +++-
 8 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py b/llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py
index f103dd2836f1a10..27b847a2d58a5d1 100644
--- a/llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx60-sm70.py
@@ -12,4 +12,5 @@
 # RUN: %}
 
 import wmma
+
 wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py b/llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py
index 6c2dffbc1070f83..20ddfc85ec6e43c 100644
--- a/llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx61-sm70.py
@@ -12,4 +12,5 @@
 # RUN: %}
 
 import wmma
+
 wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py b/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py
index 5c24676051ab181..b0403e0101722df 100644
--- a/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm72.py
@@ -12,4 +12,5 @@
 # RUN: %}
 
 import wmma
+
 wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py b/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py
index 6e5df08b8c6994a..ecaa4d287a28345 100644
--- a/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx63-sm75.py
@@ -12,4 +12,5 @@
 # RUN: %}
 
 import wmma
+
 wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py b/llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py
index adaa28bd898173b..b35fc9cb5f9cc4a 100644
--- a/llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx64-sm70.py
@@ -12,4 +12,5 @@
 # RUN: %}
 
 import wmma
+
 wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py b/llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py
index 11a589625c18579..ac0a3f089a19d1d 100644
--- a/llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx65-sm75.py
@@ -12,4 +12,5 @@
 # RUN: %}
 
 import wmma
+
 wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py b/llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py
index f7af5d6370bc04b..0da9c8e799ceb2a 100644
--- a/llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py
+++ b/llvm/test/CodeGen/NVPTX/wmma-ptx71-sm80.py
@@ -12,4 +12,5 @@
 # RUN: %}
 
 import wmma
+
 wmma.main()
diff --git a/llvm/test/CodeGen/NVPTX/wmma.py b/llvm/test/CodeGen/NVPTX/wmma.py
index 06d51a541db7521..e1e46f0b8cab34b 100644
--- a/llvm/test/CodeGen/NVPTX/wmma.py
+++ b/llvm/test/CodeGen/NVPTX/wmma.py
@@ -993,6 +993,7 @@ def gen_tests():
     items += gen_mma_tests()
     gen_check_unsupported_ops(items)
 
+
 def main():
     global ptx_version
     global gpu_arch
@@ -1006,5 +1007,6 @@ def main():
 
     gen_tests()
 
+
 if __name__ == "__main__":
-  main()
+    main()



More information about the llvm-commits mailing list