This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] libomptarget: test correction for use with OpenMP 4.5
ClosedPublic

Authored by sdmitriev on Apr 26 2017, 2:35 PM.

Details

Summary

Implicit data mapping rules for scalars referenced within target region have been changed from “tofrom” to “firstprivate” in OpenMP 4.5. Libomptarget tests offload_success.c and offload_success.cpp rely on “tofrom” default and thus have to be updated to work correctly with OpenMP 4.5.

This change will make tests fail due to a problem in OpenMP runtime function omp_is_iniital_device (it returns true when called from the target code executed on device), but that is a separate issue which has to be addressed in OpenMP runtime library.

Diff Detail

Repository
rL LLVM

Event Timeline

sdmitriev created this revision.Apr 26 2017, 2:35 PM
grokos accepted this revision.Apr 26 2017, 4:01 PM

This problem had been mentioned before, but somehow I forgot to take care of it. Thanks for the patch!

Also, it is true that omp_is_inital_device has not been implemented for the generic-elf plugin, so the runtime picks the function from libomp. I'll fix this issue.

This revision is now accepted and ready to land.Apr 26 2017, 4:01 PM

I think I do not have commit access, so I cannot commit this patch myself.

This revision was automatically updated to reflect the committed changes.