Skip to content

[NFC][OpenMP] Split nesting_of_regions test #87842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

mikerice1969
Copy link
Contributor

This test is the bottleneck for OpenMP lit tests, running about twice as long as the others. Break it into five tests based on run lines with the same version.

This test is the bottleneck for OpenMP lit tests, running about
twice as long as the others. Break it into five tests based on
run lines with the same version.
@mikerice1969
Copy link
Contributor Author

This is one way to improve the overall test time. Open for other suggestions.

Before change:

Slowest Tests:
--------------------------------------------------------------------------
144.09s: Clang :: OpenMP/nesting_of_regions.cpp
60.81s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
56.93s: Clang :: OpenMP/target_teams_distribute_parallel_for_simd_codegen_registration.cpp
51.11s: Clang :: OpenMP/target_update_codegen.cpp
50.76s: Clang :: OpenMP/target_parallel_for_simd_codegen_registration.cpp
49.79s: Clang :: OpenMP/target_parallel_for_codegen_registration.cpp
47.64s: Clang :: OpenMP/target_teams_distribute_codegen_registration.cpp
46.50s: Clang :: OpenMP/task_depend_messages.cpp
46.20s: Clang :: OpenMP/target_teams_distribute_simd_codegen_registration.cpp
43.90s: Clang :: OpenMP/target_parallel_codegen_registration.cpp
43.56s: Clang :: OpenMP/target_simd_codegen_registration.cpp
41.28s: Clang :: OpenMP/target_teams_codegen_registration.cpp
34.68s: Clang :: OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
34.51s: Clang :: OpenMP/distribute_parallel_for_reduction_messages.cpp
31.47s: Clang :: OpenMP/target_parallel_for_simd_codegen.cpp
31.03s: Clang :: OpenMP/target_parallel_generic_loop_codegen-1.cpp
30.75s: Clang :: OpenMP/atomic_compare_codegen.cpp
29.19s: Clang :: OpenMP/target_parallel_for_codegen.cpp
28.99s: Clang :: OpenMP/distribute_simd_reduction_messages.cpp
28.32s: Clang :: OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp

Tests Times:
--------------------------------------------------------------------------
[   Range   ] :: [               Percentage               ] :: [  Count  ]
--------------------------------------------------------------------------
[140s,150s) :: [                                        ] :: [   1/1401]
[130s,140s) :: [                                        ] :: [   0/1401]
[120s,130s) :: [                                        ] :: [   0/1401]
[110s,120s) :: [                                        ] :: [   0/1401]
[100s,110s) :: [                                        ] :: [   0/1401]
[ 90s,100s) :: [                                        ] :: [   0/1401]
[ 80s, 90s) :: [                                        ] :: [   0/1401]
[ 70s, 80s) :: [                                        ] :: [   0/1401]
[ 60s, 70s) :: [                                        ] :: [   1/1401]
[ 50s, 60s) :: [                                        ] :: [   4/1401]
[ 40s, 50s) :: [                                        ] :: [   6/1401]
[ 30s, 40s) :: [                                        ] :: [   7/1401]
[ 20s, 30s) :: [*                                       ] :: [  46/1401]
[ 10s, 20s) :: [**                                      ] :: [  83/1401]
[  0s, 10s) :: [***********************************     ] :: [1253/1401]
--------------------------------------------------------------------------

Testing Time: 152.87s

After split:

Slowest Tests:
--------------------------------------------------------------------------
74.79s: Clang :: OpenMP/target_teams_distribute_parallel_for_simd_codegen_registration.cpp
71.50s: Clang :: OpenMP/target_update_codegen.cpp
71.37s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
65.05s: Clang :: OpenMP/target_parallel_for_simd_codegen_registration.cpp
64.44s: Clang :: OpenMP/target_teams_distribute_simd_codegen_registration.cpp
63.47s: Clang :: OpenMP/task_depend_messages.cpp
62.47s: Clang :: OpenMP/target_parallel_for_codegen_registration.cpp
62.37s: Clang :: OpenMP/target_teams_distribute_codegen_registration.cpp
54.54s: Clang :: OpenMP/target_simd_codegen_registration.cpp
51.63s: Clang :: OpenMP/target_teams_codegen_registration.cpp
51.41s: Clang :: OpenMP/target_parallel_codegen_registration.cpp
40.03s: Clang :: OpenMP/nesting_of_regions_45.cpp
39.75s: Clang :: OpenMP/nesting_of_regions_51.cpp
39.70s: Clang :: OpenMP/nesting_of_regions_50.cpp
34.36s: Clang :: OpenMP/distribute_parallel_for_simd_reduction_messages.cpp
33.65s: Clang :: OpenMP/distribute_parallel_for_reduction_messages.cpp
32.35s: Clang :: OpenMP/target_parallel_for_simd_codegen.cpp
32.31s: Clang :: OpenMP/target_parallel_generic_loop_codegen-1.cpp
32.16s: Clang :: OpenMP/teams_distribute_parallel_for_reduction_messages.cpp
32.14s: Clang :: OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp

Tests Times:
--------------------------------------------------------------------------
[    Range    ] :: [               Percentage               ] :: [  Count  ]
--------------------------------------------------------------------------
[70.0s,75.0s) :: [                                        ] :: [   3/1405]
[65.0s,70.0s) :: [                                        ] :: [   1/1405]
[60.0s,65.0s) :: [                                        ] :: [   4/1405]
[55.0s,60.0s) :: [                                        ] :: [   0/1405]
[50.0s,55.0s) :: [                                        ] :: [   3/1405]
[45.0s,50.0s) :: [                                        ] :: [   0/1405]
[40.0s,45.0s) :: [                                        ] :: [   1/1405]
[35.0s,40.0s) :: [                                        ] :: [   2/1405]
[30.0s,35.0s) :: [                                        ] :: [  10/1405]
[25.0s,30.0s) :: [                                        ] :: [  21/1405]
[20.0s,25.0s) :: [                                        ] :: [  26/1405]
[15.0s,20.0s) :: [                                        ] :: [  23/1405]
[10.0s,15.0s) :: [*                                       ] :: [  58/1405]
[ 5.0s,10.0s) :: [*****                                   ] :: [ 182/1405]
[ 0.0s, 5.0s) :: [******************************          ] :: [1071/1405]
--------------------------------------------------------------------------

Testing Time: 74.98s

@mikerice1969 mikerice1969 marked this pull request as ready for review April 5, 2024 23:56
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:openmp OpenMP related changes to Clang labels Apr 5, 2024
@llvmbot
Copy link
Member

llvmbot commented Apr 5, 2024

@llvm/pr-subscribers-clang

Author: Mike Rice (mikerice1969)

Changes

This test is the bottleneck for OpenMP lit tests, running about twice as long as the others. Break it into five tests based on run lines with the same version.


Full diff: https://github.com/llvm/llvm-project/pull/87842.diff

6 Files Affected:

  • (renamed) clang/test/OpenMP/Inputs/nesting_of_regions.cpp (-13)
  • (added) clang/test/OpenMP/nesting_of_regions_45.cpp (+4)
  • (added) clang/test/OpenMP/nesting_of_regions_50.cpp (+4)
  • (added) clang/test/OpenMP/nesting_of_regions_51.cpp (+4)
  • (added) clang/test/OpenMP/nesting_of_regions_simd_45.cpp (+3)
  • (added) clang/test/OpenMP/nesting_of_regions_simd_50.cpp (+3)
diff --git a/clang/test/OpenMP/nesting_of_regions.cpp b/clang/test/OpenMP/Inputs/nesting_of_regions.cpp
similarity index 99%
rename from clang/test/OpenMP/nesting_of_regions.cpp
rename to clang/test/OpenMP/Inputs/nesting_of_regions.cpp
index 9442fb20647d0f..e671f9b0cf4123 100644
--- a/clang/test/OpenMP/nesting_of_regions.cpp
+++ b/clang/test/OpenMP/Inputs/nesting_of_regions.cpp
@@ -1,15 +1,3 @@
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -fno-openmp-extensions -verify=expected,omp45,omp45warn,omp %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -fno-openmp-extensions -verify=expected,omp50,omp %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-extensions -verify=expected,omp50 %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45,omp -fno-openmp-extensions -Wno-openmp %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45,omp -fno-openmp-extensions -Wno-source-uses-openmp %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=51 -verify=expected,omp51,omp -fno-openmp-extensions -Wno-source-uses-openmp %s
-
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -fno-openmp-extensions -verify=expected,omp45,omp45warn,omp %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify=expected,omp50,omp -fno-openmp-extensions %s
-// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=51 -verify=expected,omp51,omp -fno-openmp-extensions %s
-// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
-
 void bar();
 
 template <class T>
@@ -19577,4 +19565,3 @@ void foo() {
 
   return foo<int>();
 }
-
diff --git a/clang/test/OpenMP/nesting_of_regions_45.cpp b/clang/test/OpenMP/nesting_of_regions_45.cpp
new file mode 100644
index 00000000000000..d5870ec36486e7
--- /dev/null
+++ b/clang/test/OpenMP/nesting_of_regions_45.cpp
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -fno-openmp-extensions -verify=expected,omp45,omp45warn,omp %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45,omp -fno-openmp-extensions -Wno-openmp %s
+
+#include "Inputs/nesting_of_regions.cpp"
diff --git a/clang/test/OpenMP/nesting_of_regions_50.cpp b/clang/test/OpenMP/nesting_of_regions_50.cpp
new file mode 100644
index 00000000000000..f2061553a80463
--- /dev/null
+++ b/clang/test/OpenMP/nesting_of_regions_50.cpp
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -fno-openmp-extensions -verify=expected,omp50,omp %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-extensions -verify=expected,omp50 %s
+
+#include "Inputs/nesting_of_regions.cpp"
diff --git a/clang/test/OpenMP/nesting_of_regions_51.cpp b/clang/test/OpenMP/nesting_of_regions_51.cpp
new file mode 100644
index 00000000000000..856489b042821c
--- /dev/null
+++ b/clang/test/OpenMP/nesting_of_regions_51.cpp
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=51 -verify=expected,omp51,omp -fno-openmp-extensions %s
+// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=51 -verify=expected,omp51,omp -fno-openmp-extensions -Wno-source-uses-openmp %s
+
+#include "Inputs/nesting_of_regions.cpp"
diff --git a/clang/test/OpenMP/nesting_of_regions_simd_45.cpp b/clang/test/OpenMP/nesting_of_regions_simd_45.cpp
new file mode 100644
index 00000000000000..fb0d8bbfe3e486
--- /dev/null
+++ b/clang/test/OpenMP/nesting_of_regions_simd_45.cpp
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -fno-openmp-extensions -verify=expected,omp45,omp45warn,omp %s
+
+#include "Inputs/nesting_of_regions.cpp"
diff --git a/clang/test/OpenMP/nesting_of_regions_simd_50.cpp b/clang/test/OpenMP/nesting_of_regions_simd_50.cpp
new file mode 100644
index 00000000000000..ba87ba38e74a64
--- /dev/null
+++ b/clang/test/OpenMP/nesting_of_regions_simd_50.cpp
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify=expected,omp50,omp -fno-openmp-extensions %s
+
+#include "Inputs/nesting_of_regions.cpp"

Copy link
Member

@alexey-bataev alexey-bataev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@mikerice1969 mikerice1969 merged commit aa6a089 into llvm:main Apr 8, 2024
@mikerice1969 mikerice1969 deleted the split-test branch April 8, 2024 19:53
@AaronBallman
Copy link
Collaborator

Thank you for improving test run times, that's really appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:openmp OpenMP related changes to Clang clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants