[llvm] [Flang][Offload][Tests] Set default OpenMP version to 5.2 (52) (PR #110138)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 09:06:49 PDT 2024


https://github.com/agozillon created https://github.com/llvm/llvm-project/pull/110138

We recently added versioning support to Flang's OpenMP, which restricts and enables certain things based on the OpenMP specification version. Currently one of the check-offload tests makes use of a feature that's at a slightly higher version than the current default causing it to fail.

This PR basically applies the highest current OpenMP version number as a default argument for the lit.cfg, if we need more fine grained control in the future we can expand it to different lit commands for each relevant version than can then be added in each test. But for now, to keep it simple, just set the max level version.

>From 12e5589949636f925d5ff0a458c333396db59984 Mon Sep 17 00:00:00 2001
From: agozillon <Andrew.Gozillon at amd.com>
Date: Thu, 26 Sep 2024 11:02:07 -0500
Subject: [PATCH] [Flang][Offload][Tests] Set default OpenMP version to 5.2
 (52)

We recently added versioning support to Flang's OpenMP, which restricts and enables
certain things based on the OpenMP specification version. Currently one of the
check-offload tests makes use of a feature that's at a slightly higher version than the
current default causing it to fail.

This PR basically applies the highest current OpenMP version number as a default
argument for the lit.cfg, if we need more fine grained control in the future we can
expand it to different lit commands for each relevant version than can then be
added in each test. But for now, to keep it simple, just set the max level version.
---
 offload/test/lit.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/offload/test/lit.cfg b/offload/test/lit.cfg
index 514bb89e0b644e..2f1ef3e98d8172 100644
--- a/offload/test/lit.cfg
+++ b/offload/test/lit.cfg
@@ -88,7 +88,7 @@ config.test_flags = " -I " + config.test_source_root + \
 
 # compiler specific flags
 config.test_flags_clang = ""
-config.test_flags_flang = ""
+config.test_flags_flang = "-fopenmp-version=52"
 
 if config.omp_host_rtl_directory:
     config.test_flags = config.test_flags + " -L " + \



More information about the llvm-commits mailing list