Skip to content

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

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
Sep 26, 2024

Conversation

agozillon
Copy link
Contributor

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.

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.
@llvmbot
Copy link
Member

llvmbot commented Sep 26, 2024

@llvm/pr-subscribers-offload

Author: None (agozillon)

Changes

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.


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

1 Files Affected:

  • (modified) offload/test/lit.cfg (+1-1)
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 " + \

@agozillon agozillon merged commit 0215579 into llvm:main Sep 26, 2024
8 checks passed
@saiislam
Copy link
Contributor

Won't it cause confusion that the default OpenMP version of the implementation is 5.1 while for lit tests it is 5.2?
Shouldn't we version specific tests if they have different behavior across versions?

Sterling-Augustine pushed a commit to Sterling-Augustine/llvm-project that referenced this pull request Sep 27, 2024
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants