[PATCH] D105191: [Clang][OpenMP] Add support for Static Device Libraries

Saiyedul Islam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 12 23:24:37 PDT 2021


saiislam added a comment.

In D105191#2996201 <https://reviews.llvm.org/D105191#2996201>, @ye-luo wrote:

> @saiislam do my test cases work on your side? I tried this patch and still got linking failure.

Hey @ye-luo,
I am able to successfully compile and run all (36) tests in https://github.com/ye-luo/openmp-target (branch master, commit id: dd0544f).
Here are the steps I followed (all seems to be straightforward):

1. Get updated trunk
2. Apply this patch
3. Build and install llvm-project from step 2.
4. Set CC and CXX variables to newly installed location from step 3.
5. Get openmp-target repo
6. cmake, make, make all, make test






Output of make test
===================

/work/saiyedul/openmp-target/build$ make test
Running tests...
Test project /work/saiyedul/openmp-target/build

  Start  1: cxx.complex_reduction_cpu

1/36 Test  #1: cxx.complex_reduction_cpu ..........................   Passed    0.01 sec

  Start  2: cxx.complex_reduction

2/36 Test  #2: cxx.complex_reduction ..............................   Passed    0.01 sec

  Start  3: cxx.complex

3/36 Test  #3: cxx.complex ........................................   Passed    0.00 sec

  Start  4: f.complex

4/36 Test  #4: f.complex ..........................................   Passed    0.00 sec

  Start  5: cxx.global_static

5/36 Test  #5: cxx.global_static ..................................   Passed    0.00 sec

  Start  6: cxx.constexpr

6/36 Test  #6: cxx.constexpr ......................................   Passed    0.00 sec

  Start  7: cxx.link_static_fat_bin

7/36 Test  #7: cxx.link_static_fat_bin ............................   Passed    0.00 sec

  Start  8: cxx.linker_outlined_function_collision

8/36 Test  #8: cxx.linker_outlined_function_collision .............   Passed    0.00 sec

  Start  9: cxx.math_FP_ZERO

9/36 Test  #9: cxx.math_FP_ZERO ...................................   Passed    0.00 sec

  Start 10: cxx.math_header_only

10/36 Test #10: cxx.math_header_only ...............................   Passed    0.00 sec

  Start 11: cxx.math_modf

11/36 Test #11: cxx.math_modf ......................................   Passed    0.00 sec

  Start 12: cxx.math_sqrt_simd

12/36 Test #12: cxx.math_sqrt_simd .................................   Passed    0.00 sec

  Start 13: cxx.math_sin_cos

13/36 Test #13: cxx.math_sin_cos ...................................   Passed    0.00 sec

  Start 14: cxx.math_sin_simd

14/36 Test #14: cxx.math_sin_simd ..................................   Passed    0.00 sec

  Start 15: cxx.math_sincos

15/36 Test #15: cxx.math_sincos ....................................   Passed    0.00 sec

  Start 16: cxx.math_sincos_simd

16/36 Test #16: cxx.math_sincos_simd ...............................   Passed    0.00 sec

  Start 17: cxx.math_sincos_simd_template

17/36 Test #17: cxx.math_sincos_simd_template ......................   Passed    0.00 sec

  Start 18: cxx.target_teams_private__distribute

18/36 Test #18: cxx.target_teams_private__distribute ...............   Passed    0.00 sec

  Start 19: cxx.target__teams_private__distribute

19/36 Test #19: cxx.target__teams_private__distribute ..............   Passed    0.00 sec

  Start 20: cxx.target_teams_distribute_private

20/36 Test #20: cxx.target_teams_distribute_private ................   Passed    0.00 sec

  Start 21: cxx.target_teams__distribute_private

21/36 Test #21: cxx.target_teams__distribute_private ...............   Passed    0.00 sec

  Start 22: cxx.target__teams_distribute_private

22/36 Test #22: cxx.target__teams_distribute_private ...............   Passed    0.00 sec

  Start 23: cxx.target__teams__distribute_private

23/36 Test #23: cxx.target__teams__distribute_private ..............   Passed    0.00 sec

  Start 24: cxx.target_teams_distribute_parallel_for_private

24/36 Test #24: cxx.target_teams_distribute_parallel_for_private ...   Passed    0.00 sec

  Start 25: f.target_teams_distribute_parallel_for_private

25/36 Test #25: f.target_teams_distribute_parallel_for_private .....   Passed    0.00 sec

  Start 26: f.target_teams_distribute_private

26/36 Test #26: f.target_teams_distribute_private ..................   Passed    0.00 sec

  Start 27: cxx.target_nowait_task

27/36 Test #27: cxx.target_nowait_task .............................   Passed    0.00 sec

  Start 28: cxx.taskloop_offload_nowait

28/36 Test #28: cxx.taskloop_offload_nowait ........................   Passed    0.00 sec

  Start 29: cxx.taskloop

29/36 Test #29: cxx.taskloop .......................................   Passed    0.00 sec

  Start 30: cxx.omp-task-bug

30/36 Test #30: cxx.omp-task-bug ...................................   Passed    0.00 sec

  Start 31: cxx.host_bug_libomp

31/36 Test #31: cxx.host_bug_libomp ................................   Passed    0.00 sec

  Start 32: f.use_device_ptr_target

32/36 Test #32: f.use_device_ptr_target ............................   Passed    0.00 sec

  Start 33: f.allocatable_array_device

33/36 Test #33: f.allocatable_array_device .........................   Passed    0.00 sec

  Start 34: f.allocatable_array_device_ptr

34/36 Test #34: f.allocatable_array_device_ptr .....................   Passed    0.00 sec

  Start 35: f.allocatable_array_device_isptr

35/36 Test #35: f.allocatable_array_device_isptr ...................   Passed    0.00 sec

  Start 36: f.allocatable_array_device_ptr_isptr

36/36 Test #36: f.allocatable_array_device_ptr_isptr ...............   Passed    0.00 sec

100% tests passed, 0 tests failed out of 36

Label Time Summary:
cxx        =   0.08 sec*proc (28 tests)
fortran    =   0.02 sec*proc (8 tests)

Total Test time (real) =   0.12 sec


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105191/new/

https://reviews.llvm.org/D105191



More information about the cfe-commits mailing list