[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-16 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: The `/usr/include/hsa/hsa.h` file is provided by the stock Ubuntu `libhsa-runtime-dev` package. The `/opt/rocm-6.1.2/include/hsa/hsa.h` file is provided by the AMD `hsa-rocr-dev` package. The AMD `rocm-hip-runtime` package depends on both `hsa-rocr-dev` and `libhsa-runtime-dev

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-16 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: > I don't think AMD handles the actual packaging. They do: https://repo.radeon.com It happens that Ubuntu provides an old 5.2.3 `libhsa-runtime-dev` and it seems to be a dependency of some package provided by the AMD `repo.radeon.com` own repository providing ROCm 6.1.2… > I

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-15 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: I discovered something wrong: ``` ii libhsa-runtime-dev 5.2.3-5 amd64HSA Runtime API and runtime for ROCm - development files ii libhsa-runtime64-1 5.2.3-5 amd64HSA Runtime API and runtime for ROCm ii libhsakmt1:am

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-15 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: And the ROCm HSA also provides `hsa_amd_agent_info_s::HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY` so if it was using such system HSA, it should not error out. https://github.com/llvm/llvm-project/pull/95484 ___ llvm-branch-commits mailin

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-15 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: Setting `-DLIBOMPTARGET_FORCE_DLOPEN_LIBHSA=ON` that would always add `dynamic_hsa` to the include dir doesn't fix the build error. https://github.com/llvm/llvm-project/pull/95484 ___ llvm-branch-commits mailing list llvm-branch-commi

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-15 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: > If the system fails to find HSA, then it will use the dynamic version. Why is it expected for LLVM to build against system HSA first, then to rely on LLVM's HSA only if system one is missing? I'm building LLVM, not something else, so I expect LLVM to build against LLVM file

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-14 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: I reproduce the bug with both `release/18.x` and `release/17.x`. I don't reproduce the bug with `release/16.x`. I cannot test `release/15.x` because of other unrelated errors happening (like not having `getenv` defined). https://github.com/llvm/llvm-project/pull/95484 ___

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-13 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: Here is a script to reproduce the bug: ```bash #! /usr/bin/env bash set -x -u -e -o pipefail version="${1:-18}" CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)" export CMAKE_BUILD_PARALLEL_LEVEL="${CMAKE_BUILD_PARALLEL_LEVEL:-4}" workspace="llvm-bug95484-${version}" rm -rf "${workspac

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-13 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: ```$ $ rg HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY libc/utils/gpu/loader/amdgpu/Loader.cpp 521: HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY), openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h 74: HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-13 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: > We made a change recently that made the dynamic_hsa version the default. The > error you're seeing is from an old HSA, so if you're overriding the default > to use an old library that's probably not worth working around. The error I see comes from the fact there is no old HS

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-13 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: @pranav-sivaraman try this patch: ```diff diff --git a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt b/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt index 92523c23f68b..92bcd94edb7a 100644 --- a/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt +++ b/openmp/libomptarget

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-13 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: The 14 branch seems to be very old, espially the file you link is in `plugins/` directory, while the files I modify are in `plugins-nextgen/` directory, witht the `plugins/` directory not existing anymore. So I strongly doubt the patch is useful for LLVM 14, but your problem p

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-13 Thread Thomas Debesse via llvm-branch-commits
illwieckz wrote: I first noticed the issue when building the chipStar fork of LLVM 17: https://github.com/CHIP-SPV/llvm-project (branch `chipStar-llvm-17`), but the code being the same in LLVM 18, it is expected to fail in LLVM 18 too. The whole folder disappeared in `main` so I made this patc

[llvm-branch-commits] [openmp] release/18.x: [OpenMP][OMPT] Fix hsa include when building amdgpu/src/rtl.cpp (PR #95484)

2024-06-13 Thread Thomas Debesse via llvm-branch-commits
https://github.com/illwieckz created https://github.com/llvm/llvm-project/pull/95484 The `dynamic_hsa/` include directory is required by both optional `dynamic_hsa/hsa.cpp` and non-optional `src/rtl.cpp`. It should then always be included or the build will fail if only `src/rtl.cpp` is built.

[llvm-branch-commits] [libclc] release/18.x: [libclc] Fix linking against libIRReader (PR #91553)

2024-05-08 Thread Thomas Debesse via llvm-branch-commits
https://github.com/illwieckz updated https://github.com/llvm/llvm-project/pull/91553 >From dcb8d6bea11cabb60483bd3e12aa4df7b76ca204 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Thu, 9 May 2024 05:18:35 +0200 Subject: [PATCH] release/18.x: [libclc] Fix linking against libIRReader Fixes h

[llvm-branch-commits] [libclc] release/18.x: [libclc] Fix linking against libIRReader (PR #91553)

2024-05-08 Thread Thomas Debesse via llvm-branch-commits
https://github.com/illwieckz updated https://github.com/llvm/llvm-project/pull/91553 >From 604b95fa0ea0278eadfb631ee2ac15386f85edaf Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Thu, 9 May 2024 05:18:35 +0200 Subject: [PATCH] release/18.x: [libclc] Fix linking against libIRReader Fixes h

[llvm-branch-commits] [libclc] release/18.x: [libclc] Fix linking against libIRReader (PR #91553)

2024-05-08 Thread Thomas Debesse via llvm-branch-commits
https://github.com/illwieckz updated https://github.com/llvm/llvm-project/pull/91553 >From 1326001c4386a0296f1e6230c6a5228d9109ee12 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Thu, 9 May 2024 05:18:35 +0200 Subject: [PATCH] release/18.x: [libclc] Fix linking against libIRReader Fixes h

[llvm-branch-commits] [libclc] release/18.x: [libclc] Fix linking against libIRReader (PR #91553)

2024-05-08 Thread Thomas Debesse via llvm-branch-commits
https://github.com/illwieckz edited https://github.com/llvm/llvm-project/pull/91553 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libclc] [libclc] Fix linking against libIRReader (release/18.x) (PR #91553)

2024-05-08 Thread Thomas Debesse via llvm-branch-commits
https://github.com/illwieckz created https://github.com/llvm/llvm-project/pull/91553 Fixes #91551: - https://github.com/llvm/llvm-project/issues/91551 The patch is not needed in `main` because another larger patch already merged in `main` includes this change: https://github.com/llvm/llvm-pr