summaryrefslogtreecommitdiffstats
path: root/openmp/libomptarget/src/rtl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [LIBOMPTARGET]Ignore empty target descriptors.Alexey Bataev2020-01-101-0/+4
| | | | | | | | | | | | | | | | | | Summary: If the dynamically loaded module has been compiled with -fopenmp-targets and has no target regions, it has empty target descriptor. It leads to a crash at the runtime if another module has at least one target region and at least one entry in its descriptor. The runtime library is unable to load the empty binary descriptor and terminates the execution. Caused by a clang-offload-wrapper. Reviewers: grokos, jdoerfert Subscribers: caomhin, kkwli0, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D72472
* [libomptarget] Remove duplicate RTLRequiresFlags per deviceJonas Hahnfeld2019-08-091-2/+0
| | | | | | | | | | | | | | | We have one global RTLs.RequiresFlags, I don't see a need to make a copy per device that the runtime manages. This was problematic anyway because the copy happened during the first __tgt_register_lib(). This made it impossible to call __tgt_register_requires() from normal user funtions for testing. Hence, this change also fixes unified_shared_memory/shared_update.c for older versions of Clang that don't call __tgt_register_requires() before __tgt_register_lib(). Differential Revision: https://reviews.llvm.org/D66019 llvm-svn: 368465
* [OpenMP][libomptarget] Enable usage of unified memory for declare target ↵Gheorghe-Teodor Bercea2019-06-041-0/+4
| | | | | | | | | | | | | | | | | | link variables Summary: This patch enables the usage of a host variable on the device for declare target link variables when unified memory is available. Reviewers: ABataev, caomhin, grokos Reviewed By: grokos Subscribers: Hahnfeld, guansong, jdoerfert, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D60884 llvm-svn: 362505
* [OpenMP][libomptarget] Enable requires flags for target libraries.Gheorghe-Teodor Bercea2019-05-211-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Target link variables are currently implemented by creating a copy of the variables on the device side and unified memory never gets exploited. When the prgram uses the: ``` #pragma omp requires unified_shared_memory ``` directive in conjunction with a declare target link, the linked variable is no longer allocated on the device and the host version is used instead. This behavior is overridden by performing an explicit mapping. A Clang side patch is required. Reviewers: ABataev, AlexEichenberger, grokos, Hahnfeld Reviewed By: AlexEichenberger, grokos, Hahnfeld Subscribers: Hahnfeld, jfb, guansong, jdoerfert, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D60223 llvm-svn: 361294
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* [libomptarget] Remove `Devices` from `RTLInfoTy`Sergey Dmitriev2018-09-041-3/+0
| | | | | | | | This patch removes unused field `Devices` from `RTLInfoTy`. Differential Revision: https://reviews.llvm.org/D51653 llvm-svn: 341399
* [OpenMP][libomptarget] Bringing up to spec with respect to ↵Alexandre Eichenberger2018-08-231-4/+2
| | | | | | | | | | | | | | | | | | OMP_TARGET_OFFLOAD env var Summary: Right now, only the OMP_TARGET_OFFLOAD=DISABLED was implemented. Added support for the other MANDATORY and DEFAULT values. Reviewers: gtbercea, ABataev, grokos, caomhin, Hahnfeld Reviewed By: Hahnfeld Subscribers: protze.joachim, gtbercea, AlexEichenberger, RaviNarayanaswamy, Hahnfeld, guansong, openmp-commits Differential Revision: https://reviews.llvm.org/D50522 llvm-svn: 340542
* Sprinkle a few <cstdlib> includes, for libomptarget sources usingDimitry Andric2018-01-181-0/+1
| | | | | | malloc, free, alloca and getenv. NFCI. llvm-svn: 322869
* Add missing headers for Debug buildsJonas Hahnfeld2018-01-181-0/+1
| | | | llvm-svn: 322830
* [libomptarget] Split RTL plugin functionalityJonas Hahnfeld2017-12-061-0/+366
This is the first of four patches to split the target agnostic library into multiple (smaller) files. It only moves the code to separate implementation files and does no cleanup (yet) except removing unneeded headers. Differential Revision: https://reviews.llvm.org/D40798 llvm-svn: 319969
OpenPOWER on IntegriCloud