llvm-test-suite icon indicating copy to clipboard operation
llvm-test-suite copied to clipboard

[External]Add OpenACC Validation and Verification testsuite

Open wangxin0321 opened this issue 1 year ago • 12 comments

OpenACC is a high-level directive-based parallel programming model that can manage the sophistication of heterogeneity in architectures and abstract it from the users. The portability of the model across CPUs and accelerators has gained the model a wide variety of users. This means it is also crucial to analyze the reliability of the compilers' implementations.

To address this challenge, the OpenACC Validation and Verification team introduces a validation testsuite ,supported by a streamlined infrastructure, to verify the OpenACC implementations across various compilers and system architectures.

wangxin0321 avatar Oct 18 '23 09:10 wangxin0321

I have no idea how to review this unfortunately! However I believe @sunitachandra showed interest on the Clang RFC, so would have a better idea if this is being done correctly.

erichkeane avatar Nov 13 '23 15:11 erichkeane

Thanks @erichkeane! Adding my group's developer, Aaron Jarmusch, to help with the review @ajarmusch

sunitachandra avatar Nov 18 '23 20:11 sunitachandra

@wangxin0321 Thanks for taking the time to add the OpenACC V&V to Externals

The header files are located in Tests/, so maybe that folder should be included instead of the repo root?

ajarmusch avatar Nov 20 '23 17:11 ajarmusch

@ajarmusch Thank you for your suggestions. I have made the following modifications in response to your suggestions: 1 "set(_includedir "${TEST_SUITE_OpenACCVV_ROOT}/") and target_include_directories(${_name} PRIVATE) "${_includedir}")"(the addition of this header is not required), At the same time, the following simple modifications were made 1 Change the file name OpenACCV_V. 2 Change the variable names of TEST_SUITE_OFFLOADING_FLAGS and TEST_SUITE_OFFLOADING_LDFLAGS. 3 Remove the "-master"

wangxin0321 avatar Nov 21 '23 08:11 wangxin0321

@wangxin0321 the changes look good

anyone have thoughts? otherwise, LGTM to merge

ajarmusch avatar Nov 28 '23 14:11 ajarmusch

So how are these configured to run on Clang? Are they using the -fopenacc flag? Do they depend on the _OPENACC macro in some way?

If so on the latter, can we have a build option to make it configurable with the -fexperimental-openacc-macro-override flag as well?

erichkeane avatar Nov 28 '23 15:11 erichkeane

@erichkeane the flags are defined in the cmake command during the test suite build. The README gives an example using -fopenacc

ajarmusch avatar Nov 28 '23 15:11 ajarmusch

@erichkeane the flags are defined in the cmake command during the test suite build. The README gives an example using -fopenacc

Right, but I'm doubting the usefulness of adding this suite WITHOUT that flag, since that flag is required to enable OpenACC anyway, right? And I was hoping for a more 'builtin' way of using -fexperimental-openacc-macro-override (if the tests use _OpenACC in any way) in the Clang compiler, since we'd like to enable to this to validate our effort.

erichkeane avatar Nov 28 '23 15:11 erichkeane

good point, I looked at the sollve_vv and the OPENMP_C_FLAG flag is set in the OpenMP package. The sollve_vv uses find_package(OpenMP) which is in the root CMakeList.txt. So as long as the idea is to replicate it for OpenACC that should be hardcoded. Would that work?

Also, you are hoping for a builtin option for -fexperimental-openacc-macro-override? If so @wangxin0321 can you add the option for the flag?

ajarmusch avatar Nov 28 '23 21:11 ajarmusch

good point, I looked at the sollve_vv and the OPENMP_C_FLAG flag is set in the OpenMP package. The sollve_vv uses find_package(OpenMP) which is in the root CMakeList.txt. So as long as the idea is to replicate it for OpenACC that should be hardcoded. Would that work?

Also, you are hoping for a builtin option for -fexperimental-openacc-macro-override? If so @wangxin0321 can you add the option for the flag?

I would love something like that, exposed at a place that is easier to use/pipe in, I suspect this is something I'll use often.

erichkeane avatar Nov 28 '23 21:11 erichkeane

@wangxin0321 Hi, It's been a while since we heard from you. Any progress so far?

ajarmusch avatar Jan 24 '24 18:01 ajarmusch

Hi @wangxin0321, to move this along I am going to help. Since I am unable to make edits to your fork repository. I will create a separate PR and mention this PR and you as well for credit. Reach out as soon as possible

ajarmusch avatar Feb 01 '24 19:02 ajarmusch