aboutsummaryrefslogtreecommitdiff
path: root/openmp/README.rst
AgeCommit message (Collapse)AuthorFilesLines
2024-04-02[OpenMP] arm64_32 port for Apple WatchOS (#87246)nihui1-1/+1
detect `aarch64_32` with compiler defined macro `__ARM64_ARCH_8_32__` reuse ARM `__kmp_unnamed_critical_addr` and add `KMP_PREFIX_UNDERSCORE` macro like AARCH64 reuse AARCH64 `__kmp_invoke_microtask` build log for watchos armv7k + arm64_32 and watchos simulator x86_64 + arm64 https://github.com/nihui/action-protobuf/actions/runs/8520684611/job/23337305030
2023-11-03Add openmp support to System z (#66081)Neale Ferguson1-2/+2
* openmp/README.rst - Add s390x to those platforms supported * openmp/libomptarget/plugins-nextgen/CMakeLists.txt - Add s390x subdirectory * openmp/libomptarget/plugins-nextgen/s390x/CMakeLists.txt - Add s390x definitions * openmp/runtime/CMakeLists.txt - Add s390x to those platforms supported * openmp/runtime/cmake/LibompGetArchitecture.cmake - Define s390x ARCHITECTURE * openmp/runtime/cmake/LibompMicroTests.cmake - Add dependencies for System z (aka s390x) * openmp/runtime/cmake/LibompUtils.cmake - Add S390X to the mix * openmp/runtime/cmake/config-ix.cmake - Add s390x as a supported LIPOMP_ARCH * openmp/runtime/src/kmp_affinity.h - Define __NR_sched_[get|set]addinity for s390x * openmp/runtime/src/kmp_config.h.cmake - Define CACHE_LINE for s390x * openmp/runtime/src/kmp_os.h - Add KMP_ARCH_S390X to support checks * openmp/runtime/src/kmp_platform.h - Define KMP_ARCH_S390X * openmp/runtime/src/kmp_runtime.cpp - Generate code when KMP_ARCH_S390X is defined * openmp/runtime/src/kmp_tasking.cpp - Generate code when KMP_ARCH_S390X is defined * openmp/runtime/src/thirdparty/ittnotify/ittnotify_config.h - Define ITT_ARCH_S390X * openmp/runtime/src/z_Linux_asm.S - Instantiate __kmp_invoke_microtask for s390x * openmp/runtime/src/z_Linux_util.cpp - Generate code when KMP_ARCH_S390X is defined * openmp/runtime/test/ompt/callback.h - Define print_possible_return_addresses for s390x * openmp/runtime/tools/lib/Platform.pm - Return s390x as platform and host architecture * openmp/runtime/tools/lib/Uname.pm - Set hardware platform value for s390x
2023-08-29[openmp] Fix flang detection for offloading testEthan Luis McDonough1-6/+4
This patch fixes the flang detection in the openmp fortran offloading test. Reviewed By: jsjodin Differential Revision: https://reviews.llvm.org/D158546
2023-07-11[OpenMP][NFC] lit: Allow setting default environment variables for testJoachim Jenke1-0/+32
Add CHECK_OPENMP_ENV environment variable which will be passed to environment variables for test (make check-* target). This provides a handy way to exercise various openmp code with different settings during development. For example, to change default barrier pattern: ``` $ env CHECK_OPENMP_ENV="KMP_FORKJOIN_BARRIER_PATTERN=hier,hier \ KMP_PLAIN_BARRIER_PATTERN=hier,hier \ KMP_REDUCTION_BARRIER_PATTERN=hier,hier" \ ninja check-openmp ``` Even with this, each test can set appropriate environment variables if needed as before. Also, this commit adds missing documention about how to run tests in README. Patch provided by t-msn Differential Revision: https://reviews.llvm.org/D122645
2023-06-28[flang][openmp] Fortran offloading testEthan Luis McDonough1-0/+6
Flang currently supports offloading for AMD GPUs. This patch establishes a test structure for Fortran offloading tests in libomptarget. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D148778
2022-09-19[OpenMP] Add LoongArch64 supportSignKirigami1-2/+2
GCC, glibc, binutils, and LLVM have added support for LoongArch64. This patch adds support for LLVM OpenMP following D59880 for RISCV64. Reviewed By: MaskRay, SixWeining Differential Revision: https://reviews.llvm.org/D132925
2022-08-18Revert "[cmake] Use `CMAKE_INSTALL_LIBDIR` too"John Ericson1-2/+2
This reverts commit f7a33090a91015836497c75f173775392ab0304d. Unfortunately this causes a number of failures that didn't show up in my local build.
2022-08-18[cmake] Use `CMAKE_INSTALL_LIBDIR` tooJohn Ericson1-2/+2
We held off on this before as `LLVM_LIBDIR_SUFFIX` conflicted with it. Now we return this. `LLVM_LIBDIR_SUFFIX` is kept as a deprecated way to set `CMAKE_INSTALL_LIBDIR`. The other `*_LIBDIR_SUFFIX` are just removed entirely. I imagine this is too potentially-breaking to make LLVM 15. That's fine. I have a more minimal version of this in the disto (NixOS) patches for LLVM 15 (like previous versions). This more expansive version I will test harder after the release is cut. Reviewed By: sebastian-ne, ldionne, #libc, #libc_abi Differential Revision: https://reviews.llvm.org/D130586
2021-07-18[OpenMP][Offloading] Add a CMake argument LIBOMPTARGET_LIT_ARGS to control ↵Shilei Tian1-0/+6
behavior of libomptarget lit test By default, `lit` uses all threads to invoke tests, which can easily cause out of memory on GPUs because most of OpenMP offloading test usually take about 1GB GPU memory, but a typical GPU only has 4-8GB memory. This patch introduce a CMake argument `LIBOMPTARGET_LIT_ARGS` to allow users to control the behavior of `libomptarget` tests, similar to `LLVM_LIT_ARGS`. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D106236
2021-05-07An attempt to abandon omptarget out-of-tree builds.Vyacheslav Zakharin1-0/+9
I want to start using LLVM component libraries in libomptarget to stop duplicating implementations already available in LLVM (e.g. LLVMObject, LLVMSupport, etc.). Without relying on LLVM in all libomptarget builds one has to provide fallback implementation for each used LLVM feature. This is an attempt to stop supporting out-of-llvm-tree builds of libomptarget. I understand that I may need to revert this, if this affects downstream projects in a bad way. Differential Revision: https://reviews.llvm.org/D101509
2021-04-30[OpenMP][CMake] Use in-project clang as CUDA->IR compiler.Michael Kruse1-5/+9
If available, use the clang that is already built in the same project as CUDA compiler unless another executable is explicitly defined. This also ensures the generated deviceRTL IR will be consistent with the version of Clang. This patch is required to reliably test OpenMP offloading in a buildbot without either a two-stage build (e.g. with LLVM_ENABLE_RUNTIMES) or a separately installed clang on the worker that will eventually become outdated. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D101265
2021-01-27[OpenMP][Libomptarget] Fix check-libomptargetGiorgis Georgakoudis1-2/+2
The check-libomptarget fails when building with LLVM_ENABLE_PROJECTS. This is because test configuration misses the path to libomp.so and libLLVMSupport.so when time profiling is enabled (both libraries have the same path when building). This patch add the path to the configuration. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D95376
2021-01-26[OpenMP][NVPTX] Drop dependence on CUDA to build NVPTX `deviceRTLs`Shilei Tian1-1/+1
With D94745, we no longer use CUDA SDK to compile `deviceRTLs`. Therefore, many CMake code in the project is useless. This patch cleans up unnecessary code and also drops the requirement to build NVPTX `deviceRTLs`. CUDA detection is still being used however to determine whether we need to involve the tests. Auto detection of compute capability is enabled by default and can be disabled by setting CMake variable `LIBOMPTARGET_NVPTX_AUTODETECT_COMPUTE_CAPABILITY=OFF`. If auto detection is enabled, and CUDA is also valid, it will only build the bitcode library for the detected version; otherwise, all variants supported will be generated. One drawback of this patch is, we now generate 96 variants of bitcode library, and totally 1485 files to be built with a clean build on a non-CUDA system. `LIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=""` can be used to disable building NVPTX `deviceRTLs`. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D95466
2020-04-21[OpenMP] Add scaffolding for negative runtime testsJoel E. Denny1-0/+4
Without this patch, the openmp project's test suites do not appear to have support for negative tests. However, D78170 needs to add a test that an expected runtime failure occurs. This patch makes `not` visible in all of the openmp project's test suites. In all but `libomptarget/test`, it should be possible for a test author to insert `not` before a use of the lit substitution for running a test program. In `libomptarget/test`, that substitution is target-specific, and its value is `echo` when the target is not available. In that case, inserting `not` before a lit substitution would expect an `echo` fail, so this patch instead defines a separate lit substitution for expected runtime fails. Reviewed By: jdoerfert, Hahnfeld Differential Revision: https://reviews.llvm.org/D78566
2020-03-22Doc: Links should use httpsSylvestre Ledru1-1/+1
2019-07-30[OpenMP] Rename last file to cpp and remove LIBOMP_CFLAGSJonas Hahnfeld1-6/+3
All other files are already C++ and the build system has always passed '-x c++' for C files, effectively compiling them as C++. To stay warning free we need one fix in ittnotify_static.{c,cpp}: The variable dll_path can be written to, so it must not be const. GCC complained with -Wcast-qual and I think it's right. Differential Revision: https://reviews.llvm.org/D65285 llvm-svn: 367343
2019-07-25[OpenMP] RISCV64 portJonas Hahnfeld1-3/+3
This is a port of libomp for the RISC-V 64-bit Linux target. We have tested this port on a HiFive Unleashed development board using a downstream LLVM that has support for the missing bits in upstream. As of now, all tests are passing, including OMPT. Patch by Ferran Pallarès! Differential Revision: https://reviews.llvm.org/D59880 llvm-svn: 367021
2019-07-12[OpenMP] Remove OMP spec versioningJonathan Peyton1-6/+2
Remove all older OMP spec versioning from the runtime and build system. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D64534 llvm-svn: 365963
2018-08-02[OMPT] Disable by default on WindowsJonas Hahnfeld1-1/+1
This is broken per PR36561 and PR36574, so disable it for now until somebody interested can take a look. OMPT can still be activated manually by passing -DLIBOMP_OMPT_SUPPORT=ON during configuration. Differential Revision: https://reviews.llvm.org/D50086 llvm-svn: 338721
2018-05-16[libomptarget-nvptx] Test bitcode compiler flags and enable by defaultJonas Hahnfeld1-2/+4
Move all logic related to selecting the bitcode compiler and linker into a new file and dynamically test required compiler flags. This also adds -fcuda-rdc for Clang trunk as previously attempted in D44992 which fixes the build. As a result this change also enables building the library by default if all prerequisites are met. Differential Revision: https://reviews.llvm.org/D46901 llvm-svn: 332494
2018-02-12[OpenMP][libomptarget] Enable the compilation of multiple bc libraries for ↵Gheorghe-Teodor Bercea1-4/+4
runtime inlining Summary: Different NVIDIA GPUs support different compute capabilities. To enable the inlining of runtime functions and the best performance on different generations of NVIDIA GPUs, a bc library for each compute capability needs to be compiled. The same compiler build will then be usable in conjunction with multiple generations of NVIDIA GPUs. To differentiate between versions of the same bc lib, the output file name will contain the compute capability ID. Depends on D14254 Reviewers: Hahnfeld, hfinkel, carlo.bertolli, caomhin, ABataev, grokos Reviewed By: Hahnfeld, grokos Subscribers: guansong, mgorny, openmp-commits Differential Revision: https://reviews.llvm.org/D41724 llvm-svn: 324904
2018-01-29[OpenMP] Initial implementation of OpenMP offloading library - libomptarget ↵George Rokos1-1/+35
device RTLs. This patch implements the device runtime library whose interface is used in the code generation for OpenMP offloading devices. Currently there is a single device RTL written in CUDA meant to CUDA enabled GPUs. The interface is a variation of the kmpc interface that includes some extra calls to do thread and storage management that only make sense for a GPU target. Differential revision: https://reviews.llvm.org/D14254 llvm-svn: 323649
2018-01-23Fix name of 'macOS' and add asteriks to brands, NFC.Jonas Hahnfeld1-1/+1
llvm-svn: 323180
2018-01-02[OMPT] Build runtime with OMPT support by defaultJoachim Protze1-2/+5
This patch enables OMPT by default if version 50 or later is built and the config says, that OMPT will be supported. Differential Revision: https://reviews.llvm.org/D41508 llvm-svn: 321675
2017-12-27Unify build documentation and convert to reStructuredTextJonas Hahnfeld1-0/+304
We now have several options that apply for both libraries and they shouldn't be documented in multiple files. When already merging the two Build_With_CMake.txt documents, convert them to reStructuredText which is used for all of LLVM's documentation. Differential Revision: https://reviews.llvm.org/D40920 llvm-svn: 321481