[all-commits] [llvm/llvm-project] 47e95e: [libomptarget] Build cuda plugin without cuda inst...

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Fri Jan 22 16:15:35 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47e95e87a3e4f738635ff965616d4e2d96bf838a
      https://github.com/llvm/llvm-project/commit/47e95e87a3e4f738635ff965616d4e2d96bf838a
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2021-01-23 (Sat, 23 Jan 2021)

  Changed paths:
    A openmp/libomptarget/include/dlwrap.h
    M openmp/libomptarget/plugins/cuda/CMakeLists.txt
    A openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
    A openmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h

  Log Message:
  -----------
  [libomptarget] Build cuda plugin without cuda installed locally

[libomptarget] Build cuda plugin without cuda installed locally

Compiles a new file, `plugins/cuda/dynamic_cuda/cuda.cpp`, to an object file that exposes the same symbols that the plugin presently uses from libcuda. The object file contains dlopen of libcuda and cached dlsym calls. Also provides a cuda.h containing the subset that is used.

This lets the cmake file choose between the system cuda and a dlopen shim, with no changes to rtl.cpp.

The corresponding change to amdgpu is postponed until after a refactor of the plugin to reduce the size of the hsa.h stub required

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95155




More information about the All-commits mailing list