Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[offload] [test-suite] 19.1.1 Bug in the test-suite for the offload runtime #112210

Open
Crivella opened this issue Oct 14, 2024 · 1 comment
Open

Comments

@Crivella
Copy link

When running the test-suite after a 3 stage build, if the offload runtime is enabled (tested with host offloading only), all test related to offloading fails with error of the type described in:

I am unsure if I am doing something wrong in my build setup, but in case this is an actual bug, I was able to fix it by applying the patch in:

Description of the changes:

  • offload/CMakeLists.txt: Required to add -fopenmp to the test_openmp_flags in the respective lit.cfg file
  • offload/test/lit.cfg: Required to add the correct include path to:
    • the omp.h header as omp_header_directory (LIBOMPTARGET_OPENMP_HEADER_FOLDER) are not being set
      • This should probably be solved in the CMakeLists.txt but I am not sure if it is as straightforward as copying the old lines from openmp/runtime as I assume CMAKE_CURRENT_BINARY_DIR is not gonna be the same when run from the offload dir.
    • Use the correct target: the offload tests will set the target to x86_64-pc-linux-gnu even if the default target for the clang compilation is x86_64-unknown-linux-gnu. If the correct target is not set the tests will fail for not finding the clang_rt.builtins.a file
      ld.lld: error: cannot open /home/crivella/.local/easybuild/build/LLVM/19.1.1/system-system/llvm.obj.3/lib/clang/19/lib/x86_64-pc-linux-gnu/libclang_rt.builtins.a: No such file or directory
      
      • I am unsure if the way this is implemented would be able to catch all triples provided by config.guess beyond the x86_64 archs.
  • offload/test/lit.site.cfg.in: Same as last point in order to pass config.host_triple to the lit.cfg file in order to check the currently set host triple vs the tested openmp_target
@llvmbot
Copy link
Member

llvmbot commented Oct 14, 2024

@llvm/issue-subscribers-offload

Author: Davide Grassano (Crivella)

When running the test-suite after a 3 stage build, if the `offload` runtime is enabled (tested with host offloading only), all test related to offloading fails with error of the type described in:

I am unsure if I am doing something wrong in my build setup, but in case this is an actual bug, I was able to fix it by applying the patch in:

Description of the changes:

  • offload/CMakeLists.txt: Required to add -fopenmp to the test_openmp_flags in the respective lit.cfg file
  • offload/test/lit.cfg: Required to add the correct include path to:
    • the omp.h header as omp_header_directory (LIBOMPTARGET_OPENMP_HEADER_FOLDER) are not being set
      • This should probably be solved in the CMakeLists.txt but I am not sure if it is as straightforward as copying the old lines from openmp/runtime as I assume CMAKE_CURRENT_BINARY_DIR is not gonna be the same when run from the offload dir.
    • Use the correct target: the offload tests will set the target to x86_64-pc-linux-gnu even if the default target for the clang compilation is x86_64-unknown-linux-gnu. If the correct target is not set the tests will fail for not finding the clang_rt.builtins.a file
      ld.lld: error: cannot open /home/crivella/.local/easybuild/build/LLVM/19.1.1/system-system/llvm.obj.3/lib/clang/19/lib/x86_64-pc-linux-gnu/libclang_rt.builtins.a: No such file or directory
      
      • I am unsure if the way this is implemented would be able to catch all triples provided by config.guess beyond the x86_64 archs.
  • offload/test/lit.site.cfg.in: Same as last point in order to pass config.host_triple to the lit.cfg file in order to check the currently set host triple vs the tested openmp_target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants