Skip to content
  1. Jan 19, 2019
    • Chandler Carruth's avatar
      Install new LLVM license structure and new developer policy. · 469bdefd
      Chandler Carruth authored
      This installs the new developer policy and moves all of the license
      files across all LLVM projects in the monorepo to the new license
      structure. The remaining projects will be moved independently.
      
      Note that I've left odd formatting and other idiosyncracies of the
      legacy license structure text alone to make the diff easier to read.
      Critically, note that we do not in any case *remove* the old license
      notice or terms, as that remains necessary until we finish the
      relicensing process.
      
      I've updated a few license files that refer to the LLVM license to
      instead simply refer generically to whatever license the LLVM project is
      under, basically trying to minimize confusion.
      
      This is really the culmination of so many people. Chris led the
      community discussions, drafted the policy update and organized the
      multi-year string of meeting between lawyers across the community to
      figure out the strategy. Numerous lawyers at companies in the community
      spent their time figuring out initial answers, and then the Foundation's
      lawyer Heather Meeker has done *so* much to help refine and get us ready
      here. I could keep going on, but I just want to make sure everyone
      realizes what a huge community effort this has been from the begining.
      
      Differential Revision: https://reviews.llvm.org/D56897
      
      llvm-svn: 351631
      469bdefd
  2. Jan 17, 2019
  3. Jan 16, 2019
  4. Jan 15, 2019
  5. Jan 13, 2019
    • Roman Lebedev's avatar
      [OpenMP] Fix LIBOMP_USE_DEBUGGER=ON build (PR38612) · 06e39505
      Roman Lebedev authored
      Summary:
      Two things:
      1. Those two variables had the wrong sigdness, which was resulting in "sign mismatch in comparison" warning.
      2. The whole `kmp_debugger.cpp` wasn't being built, or rather, it was being built as-if `USE_DEBUGGER` was off,
         thus, nothing provided the definition of `__kmp_omp_debug_struct_info`, `__kmp_debugging`.
         Makes sense, because `USE_DEBUGGER` is set in `kmp_config.h`, which is not included explicitly.
         It is included by `kmp.h`, but that one is only included inside of the `#if USE_DEBUGGER` block..
         I *think* this is the only source file with this issue,
         everything else seem to `#include` either `kmp.h` or `kmp_config.h`.
         The alternative solution would be to add `add_compile_options(-include kmp_config.h)` in CMake.
      
      I did verify that `__kmp_omp_debug_struct_info` becomes available with this patch.
      
      Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=38612 | PR38612 ]].
      
      Reviewers: AndreyChurbanov, jlpeyton, Hahnfeld
      
      Reviewed By: jlpeyton
      
      Subscribers: guansong, jfb, openmp-commits
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D55783
      
      llvm-svn: 351019
      06e39505
  6. Jan 09, 2019
  7. Jan 07, 2019
    • Alexey Bataev's avatar
      [OPENMP][NVPTX]Fix dynamic scheduling. · 26e6c86b
      Alexey Bataev authored
      Summary:
      Previous implementation may cause the runtime crash when the number of
      teams is > 1024. Patch fixes this problem + reduces number of the atomic
      operations by 32 times.
      
      Reviewers: grokos, gtbercea, kkwli0
      
      Subscribers: guansong, jfb, openmp-commits, caomhin
      
      Differential Revision: https://reviews.llvm.org/D56332
      
      llvm-svn: 350524
      26e6c86b
  8. Jan 04, 2019
    • Alexey Bataev's avatar
      [OPENMP][NVPTX]General formatting/code improvement, NFC. · 6b3153ad
      Alexey Bataev authored
      Summary: Formatting.
      
      Reviewers: gtbercea, grokos, kkwli0
      
      Subscribers: guansong, openmp-commits, caomhin
      
      Differential Revision: https://reviews.llvm.org/D56290
      
      llvm-svn: 350431
      6b3153ad
    • Alexey Bataev's avatar
      [OPENMP][NVPTX]Improve performance + reduce number of used registers. · dcf2edcd
      Alexey Bataev authored
      Summary:
      Reduced number of the used register + improved performance propagating
      the information about current execution/data sharing mode directly from
      the compiler, where it is possible.
      In some cases, it requires new/reworked interfaces of the runtime
      external functions. Old functions are marked as deprecated.
      
      Reviewers: grokos, gtbercea, kkwli0
      
      Subscribers: guansong, jfb, openmp-commits, caomhin
      
      Differential Revision: https://reviews.llvm.org/D56278
      
      llvm-svn: 350405
      dcf2edcd
    • Joel E. Denny's avatar
      [OpenMP] Fix nvidia-cuda-toolkit detection on Debian/Ubuntu · f17f7a5d
      Joel E. Denny authored
      The OpenMP runtime's cmake scripts do not correctly locate the
      libdevice that the Debian/Ubuntu package nvidia-cuda-toolkit currently
      includes, at least on my Ubuntu 18.04.1 installation.  This patch
      fixes that for me.
      
      This problem was discussed at length in D55269.  D40453 added a
      similar adjustment in clang, but reviewers of D55269 concluded that,
      for the OpenMP runtime, the right place to address this problem is in
      cmake's CUDA support.  However, it was also suggested we could add a
      workaround to OpenMP's cmake scripts now.  This patch contains such a
      workaround, which I've tried to design so that it will have no harmful
      effect if cmake improves in the future.
      
      nvidia-cuda-toolkit also needs improvements because its intended
      monolithic CUDA tree shim, /usr/lib/cuda, has many empty directories,
      such as bin.  I reported that at:
      
      <https://bugs.launchpad.net/ubuntu/+source/nvidia-cuda-toolkit/+bug/1808999>
      
      Reviewed By: grokos
      
      Differential Revision: https://reviews.llvm.org/D55588
      
      llvm-svn: 350377
      f17f7a5d
  9. Jan 03, 2019
    • Jonathan Peyton's avatar
      [OpenMP] Add omp_get_device_num() and update several other device API functions · 76f3980a
      Jonathan Peyton authored
      Add omp_get_device_num() function for 5.0 which returns the number of the
      device the current thread is running on. Currently, we are leaving it to the
      compiler to handle this properly if it is called inside target.
      
      Also, did some cleanup and updating of duplicate device API functions (in both
      libomp and libomptarget) to make them into weak functions that check for the
      symbol from libomptarget, and will call the version in libomptarget if it is
      present. If any additional device API functions are implemented also in
      libomptarget in the future, we should add the dlsym calls to the host functions.
      Also, if the omp_target_* functions are to be implemented for the host (this has
      been requested), they should attempt to call the libomptarget versions as well.
      
      Patch by Terry Wilmarth
      
      Differential Revision: https://reviews.llvm.org/D55578
      
      llvm-svn: 350352
      76f3980a
    • Alexey Bataev's avatar
      [OPENMP][NVPTX]Fix incompatibility of __syncthreads with LLVM, NFC. · 3c74be80
      Alexey Bataev authored
      Summary:
      One of the LLVM optimizations, split critical edges, also clones tail
      instructions. This is a dangerous operation for __syncthreads()
      functions and this transformation leads to undefined behavior or
      incorrect results. Patch fixes this problem by replacing __syncthreads()
      function with the assembler instruction, which cost is too high and
      wich cannot be copied.
      
      Reviewers: grokos, gtbercea, kkwli0
      
      Subscribers: guansong, openmp-commits, caomhin
      
      Differential Revision: https://reviews.llvm.org/D56274
      
      llvm-svn: 350333
      3c74be80
  10. Jan 02, 2019
  11. Dec 28, 2018
  12. Dec 22, 2018
  13. Dec 18, 2018
  14. Dec 17, 2018
  15. Dec 15, 2018
    • Roman Lebedev's avatar
      [OpenMP] Fixes for LIBOMP_OMP_VERSION=45/40 · 781a0896
      Roman Lebedev authored
      Summary:
      I have discovered this because i wanted to experiment with
      building static libomp (with openmp-4.0 support only)
      for debugging purposes.
      
      There are three kinds of problems here:
      1. `__kmp_compare_and_store_acq()` simply does not exist.
         It was added in D47903 by @jlpeyton.
         I'm guessing `__kmp_atomic_compare_store_acq()` was meant.
      2. In `__kmp_is_ticket_lock_initialized()`,
         `lck->lk.initialized` is `std::atomic<bool>`,
         while `lck` is `kmp_ticket_lock_t *`.
         Naturally, they can't be equality-compared.
         Either, it should return the value read from `lck->lk.initialized`,
         or do what `__kmp_is_queuing_lock_initialized()` does,
         compare the passed pointer with the field in the struct
         pointed by the pointer. I think the latter is correct-er choice here.
      3. Tests were not versioned.
         They assume that `LIBOMP_OMP_VERSION` is at the latest version.
      
      This does not touch LIBOMP_OMP_VERSION=30. That is still broken.
      
      Reviewers: jlpeyton, Hahnfeld, AndreyChurbanov
      
      Reviewed By: AndreyChurbanov
      
      Subscribers: guansong, jfb, openmp-commits, jlpeyton
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D55496
      
      llvm-svn: 349260
      781a0896
  16. Dec 14, 2018
    • Jonathan Peyton's avatar
      [OpenMP] Fix transient divide by zero bug in 32-bit code · bdb0a2ff
      Jonathan Peyton authored
      The value returned by __kmp_now_nsec() can overflow 32-bit values causing
      incorrect values to be returned. The overflow can end up causing a divide
      by zero error because in __kmp_initialize_system_tick(), the value
      (__kmp_now_nsec() - nsec) can end up being much larger than the numerator:
      1e6 * (delay + (now - goal))
      during a pathological timing where the current time calculated is much larger
      than nsec. When this happens, the value of __kmp_ticks_per_msec is set to zero
      which is then used as the denominator in the KMP_NOW_MSEC() macro leading to
      the divide by zero error.
      
      Differential Revision: https://reviews.llvm.org/D55300
      
      llvm-svn: 349090
      bdb0a2ff
    • Jonathan Peyton's avatar
      [OpenMP] Implement OpenMP 5.0 affinity format functionality · 6d88e049
      Jonathan Peyton authored
      This patch adds the affinity format functionality introduced in OpenMP 5.0.
      This patch adds: Two new environment variables:
      
      OMP_DISPLAY_AFFINITY=TRUE|FALSE
      OMP_AFFINITY_FORMAT=<string>
      and Four new API:
      1) omp_set_affinity_format()
      2) omp_get_affinity_format()
      3) omp_display_affinity()
      4) omp_capture_affinity()
      The affinity format functionality has two ICV's associated with it:
      affinity-display-var (bool) and affinity-format-var (string).
      The affinity-display-var enables/disables the functionality through the
      envirable OMP_DISPLAY_AFFINITY. The affinity-format-var is a formatted
      string with the special field types beginning with a '%' character
      similar to printf
      For example, the affinity-format-var could be:
      "OMP: host:%H pid:%P OStid:%i num_threads:%N thread_num:%n affinity:{%A}"
      
      The affinity-format-var is displayed by every thread implicitly at the beginning
      of a parallel region when any thread's affinity has changed (including a brand
      new thread being spawned), or explicitly using the omp_display_affinity() API.
      The omp_capture_affinity() function can capture the affinity-format-var in a
      char buffer. And omp_set|get_affinity_format() allow the user to set|get the
      affinity-format-var explicitly at runtime. omp_capture_affinity() and
      omp_get_affinity_format() both return the number of characters needed to hold
      the entire string it tried to make (not including NULL character). If not
      enough buffer space is available,
      both these functions truncate their output.
      
      Differential Revision: https://reviews.llvm.org/D55148
      
      llvm-svn: 349089
      6d88e049
  17. Dec 13, 2018
  18. Dec 11, 2018
Loading