[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.

This also simplifies the way header files from `dynamic_hsa/` are included in 
`src/rtl.cpp`.

Fixes:

```
error: ‘HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY’ was not declared in this scope
```

>From e84e8bdef6d902d51a72eb93f7ca9812f0467c72 Mon Sep 17 00:00:00 2001
From: Thomas Debesse 
Date: Fri, 14 Jun 2024 00:38:25 +0200
Subject: [PATCH] release/18.x: [OpenMP][OMPT] Fix hsa include when building
 amdgpu/src/rtl.cpp
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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.

This also simplifies the way header files from dynamic_hsa/
are included in src/rtl.cpp.

Fixes:

  error: ‘HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY’ was not declared in this scope
---
 .../libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt |  4 +++-
 openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp | 10 --
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt 
b/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
index 68ce63467a6c8..42cc560c79112 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/CMakeLists.txt
@@ -38,13 +38,15 @@ add_definitions(-DDEBUG_PREFIX="TARGET AMDGPU RTL")
 set(LIBOMPTARGET_DLOPEN_LIBHSA OFF)
 option(LIBOMPTARGET_FORCE_DLOPEN_LIBHSA "Build with dlopened libhsa" 
${LIBOMPTARGET_DLOPEN_LIBHSA})
 
+# Required by both optional dynamic_hsa/hsa.cpp and non-optional src/rtl.cpp.
+include_directories(dynamic_hsa)
+
 if (${hsa-runtime64_FOUND} AND NOT LIBOMPTARGET_FORCE_DLOPEN_LIBHSA)
   libomptarget_say("Building AMDGPU NextGen plugin linked against libhsa")
   set(LIBOMPTARGET_EXTRA_SOURCE)
   set(LIBOMPTARGET_DEP_LIBRARIES hsa-runtime64::hsa-runtime64)
 else()
   libomptarget_say("Building AMDGPU NextGen plugin for dlopened libhsa")
-  include_directories(dynamic_hsa)
   set(LIBOMPTARGET_EXTRA_SOURCE dynamic_hsa/hsa.cpp)
   set(LIBOMPTARGET_DEP_LIBRARIES)
 endif()
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp 
b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index 81634ae1edc49..8cedc72d5f63c 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -56,18 +56,8 @@
 #define BIGENDIAN_CPU
 #endif
 
-#if defined(__has_include)
-#if __has_include("hsa/hsa.h")
-#include "hsa/hsa.h"
-#include "hsa/hsa_ext_amd.h"
-#elif __has_include("hsa.h")
 #include "hsa.h"
 #include "hsa_ext_amd.h"
-#endif
-#else
-#include "hsa/hsa.h"
-#include "hsa/hsa_ext_amd.h"
-#endif
 
 namespace llvm {
 namespace omp {

___
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] [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 patch to target the most 
recent release branch having those files: LLVM18.

It would be good to backport it to LLVM 17 too.

I haven't checked it yet if versions older than LLVM 17 are affected.

https://github.com/llvm/llvm-project/pull/95484
___
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] [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 probably needs another but similar 
solution.

https://github.com/llvm/llvm-project/pull/95484
___
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] [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/plugins/amdgpu/CMakeLists.txt
@@ -56,13 +56,14 @@ include_directories(
 set(LIBOMPTARGET_DLOPEN_LIBHSA OFF)
 option(LIBOMPTARGET_FORCE_DLOPEN_LIBHSA "Build with dlopened libhsa" 
${LIBOMPTARGET_DLOPEN_LIBHSA})
 
+include_directories(dynamic_hsa)
+
 if (${hsa-runtime64_FOUND} AND NOT LIBOMPTARGET_FORCE_DLOPEN_LIBHSA)
   libomptarget_say("Building AMDGPU plugin linked against libhsa")
   set(LIBOMPTARGET_EXTRA_SOURCE)
   set(LIBOMPTARGET_DEP_LIBRARIES hsa-runtime64::hsa-runtime64)
 else()
   libomptarget_say("Building AMDGPU plugin for dlopened libhsa")
-  include_directories(dynamic_hsa)
   set(LIBOMPTARGET_EXTRA_SOURCE dynamic_hsa/hsa.cpp)
   set(LIBOMPTARGET_DEP_LIBRARIES)
 endif()
```

I haven't tested it, but maybe the mistake is similar.

https://github.com/llvm/llvm-project/pull/95484
___
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] [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 HSA around to workaround an 
LLVM bug.

There is no `hsa/hsa.h` in the tree, the default `dynamic_hsa` is not used.

The `hsa/hsa.h` file is from ROCm, not from LLVM.

Without such patch, LLVM requires ROCm to be installed and configured to be in 
default includes for `src/rtl.cpp` to build if `hsa.cpp` is not built.

This patch is to make LLVM use `dynamic_hsa` for building `src/rtl.cpp` because 
it is the default.

This patch is needed to build both `release/17.x` and `release/18.x`, the 
`main` branch changed the code layout so the patch will not work.

I assume a full LLVM build will not trigger the build problem because something 
else will include `dynamic_hsa` and will make it findable by `src/rtl.cpp` by 
luck. But when building a not-full LLVM, just what's needed by some 
applications, `dynamic_hsa` is not added to the include directories while being 
required by `src/rtl.cpp`.

https://github.com/llvm/llvm-project/pull/95484
___
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] [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 = 0xA016,

openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
1892:if (auto Err = getDeviceAttrRaw(HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY,
```

The `openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp` file requires the 
`HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY` symbol.

This symbol is expected to be provided by 
`openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h`, not by 
third-party external `/opt/rocm/include/hsa/hsa_ext_amd.h`

The code in `release/17.x` and `release/18.x` is explictely looking for 
`ROCm`'s `hsa/_ext_amd.h` and never look for LLVM `dynamic_hsa/hsa_ext_amd.h`. 
It tries to look for LLVM-provided `hsa_ext_amd.h` as a fallback but because of 
a mistake in `CMakeLists.txt`, this doesn't work in all cases because 
`dynamic_hsa` is not added to include directories in all cases.

https://github.com/llvm/llvm-project/pull/95484
___
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] [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 "${workspace}"
mkdir "${workspace}"
cd "${workspace}"

git clone --depth 1 \
--branch "release/${version}.x" \
'https://github.com/llvm/llvm-project.git' \
'llvm-project'

git clone --depth 1 \
'https://github.com/KhronosGroup/SPIRV-Headers.git' \
'llvm-project/llvm/projects/SPIRV-Headers'

git clone --depth 1 \
--branch "llvm_release_${version}0" \
'https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git' \
'llvm-project/llvm/projects/SPIRV-LLVM-Translator'

cmake \
-S'llvm-project/llvm' \
-B'build' \
-G'Ninja' \
-D'CMAKE_INSTALL_PREFIX'='install' \
-D'CMAKE_BUILD_TYPE'='Release' \
-D'BUILD_SHARED_LIBS'='ON' \
-D'LLVM_ENABLE_PROJECTS'='clang;openmp' \
-D'LLVM_TARGETS_TO_BUILD'='Native' \
-D'LLVM_EXPERIMENTAL_TARGETS_TO_BUILD'='SPIRV' \
-D'LLVM_ENABLE_ASSERTIONS'='OFF' \
-D'LLVM_ENABLE_RTTI'='ON' \
-D'LLVM_BUILD_TESTS'='OFF' \
-D'LLVM_BUILD_TOOLS'='ON' \
-D'LLVM_SPIRV_INCLUDE_TESTS'='OFF' \
-D'LLVM_EXTERNAL_PROJECTS'='SPIRV-Headers'

cmake --build 'build'

cmake --install 'build'
```

It can be used just by saving it as `llvm-bug95484` and running it by doing 
either:

- `./llvm-bug95484`
  to fetch and attempt a clean build of `release/18.x` in a way it reproduces 
the bug,
- `./llvm-bug95484 17`
  to fetch and reproduce the bug with `release/17.x`.

It will fail this way:

```
llvm-bug95484-18/llvm-project/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp:1902:37:
 error: ‘HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY’ was not declared in this scope;
 did you mean ‘HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY’?
 1902 | if (auto Err = 
getDeviceAttrRaw(HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY,
  | 
^~
  | HSA_SYSTEM_INFO_TIMESTAMP_FREQUENCY
```

https://github.com/llvm/llvm-project/pull/95484
___
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] [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 mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[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 
files.

> unfortunately the HSA headers really don't give you much versioning to work 
> with, so we can't do `ifdef` on this stuff.

If LLVM was attempting to use LLVM's HSA first, it would be possible to do `#if 
__has_include("dynamic_hsa/hsa.h")`, then `#elif __has_include("hsa/hsa.h")` 
for system's one. But since LLVM provides its own HSA, it would always use its 
own one.

If a two-weeks old ROCm 6.1.2 is already considered too old by both LLVM 17, it 
is safe to assume that ROCm 6.1.2 will never be young enough for LLVM17… Then I 
don't see why both LLVM 17 and LLVM 18 would try to use something that will 
never be young enough…

https://github.com/llvm/llvm-project/pull/95484
___
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] [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-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[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 mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[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:amd64   5.2.3+dfsg-1  amd64Thunk library 
for AMD KFD (shlib)
```

It looks like I have some HSA 5.2.3 files… The `libhsa-runtime-dev` provides 
`/usr/include/hsa/hsa.h`.

This `libhsa-runtime-dev` package looks to be provided by the system (Ubuntu), 
but and if I attempt to uninstall it, it attempts to also uninstall 
`rocm-hip-runtime=6.1.2.60102-119~22.04` and `libdrm-amdgpu-dev`…

So ROCm 6.1.2 actually installs both `/opt/rocm-6.1.2/include/hsa/hsa.h` and 
5.2.3 `/usr/include/hsa/hsa.h`, and of course only the first one provides 
`HSA_AMD_AGENT_INFO_TIMESTAMP_FREQUENCY`…

This doesn't make sense, the ROCm packages may be just badly made by AMD.

So I temporarily remove `/usr/include/hsa` without uninstalling 
`libhsa-runtime-dev` **AND** using `-DLIBOMPTARGET_FORCE_DLOPEN_LIBHSA=ON`, I 
can build LLVM18 without patch.

With that option being `-DLIBOMPTARGET_FORCE_DLOPEN_LIBHSA=OFF` CMake complains 
that `/usr/include/hsa` is missing.

So it looks like I'm tracking a ROCm packaging bug from AMD side. I still don't 
get why LLVM doesn't use its own HSA by default.

https://github.com/llvm/llvm-project/pull/95484
___
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] [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…

> It does in the main branch, but I think you're right that the logic causes it 
> to look at the system one first since `hsa/hsa.h` is higher up the search 
> list. Should probably do something about that.

Maybe, instead of adding `dynamic_hsa/` directory to include directories and 
assuming an ambiguous implicit directory for `hsa.h`, we would not add that 
directory and do explicitely:


```c++
#if defined(__has_include)
#if __has_include("dynamic_hsa/hsa.h")
#include "dynamic_hsa/hsa.h"
#include "dynamic_hsa/hsa_ext_amd.h"
#if __has_include("hsa/hsa.h")
#include "hsa/hsa.h"
#include "hsa/hsa_ext_amd.h"
#elif __has_include("hsa.h")
#include "hsa.h"
#include "hsa_ext_amd.h"
#endif
#else
#include "dynamic_hsa/hsa.h"
#include "dynamic_hsa/hsa_ext_amd.h"
#endif
```

https://github.com/llvm/llvm-project/pull/95484
___
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] [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`…

```
$ debtree rocm-hip-runtime 2>/dev/null | grep -E -- '-> "hip-runtime-amd|-> 
"hsa-rocr-dev|-> "hipcc|-> "libamdhip64-dev|-> "libhsa-runtime-dev'
"rocm-hip-runtime" -> "hip-runtime-amd" [color=blue,label="(= 
6.1.40093.60102-119~22.04)"];
"hip-runtime-amd" -> "hsa-rocr-dev" [color=blue,label="(>= 1.3)"];
"hip-runtime-amd" -> "hipcc" [color=blue];
"hipcc" -> "libamdhip64-dev" [color=blue];
"libamdhip64-dev" -> "libhsa-runtime-dev" [color=blue];
```

```
$ apt-get install --reinstall rocm-hip-runtime hip-runtime-amd hsa-rocr-dev 
hipcc libhsa-runtime-dev
Get:1 http://archive.ubuntu.com/ubuntu mantic/universe amd64 hipcc amd64 
5.2.3-12 [25,1 kB]
Get:2 http://archive.ubuntu.com/ubuntu mantic/universe amd64 libhsa-runtime-dev 
amd64 5.2.3-5 [73,3 kB]
Get:3 https://repo.radeon.com/rocm/apt/6.1.2 jammy/main amd64 hip-runtime-amd 
amd64 6.1.40093.60102-119~22.04 [27,1 MB]
Get:4 https://repo.radeon.com/rocm/apt/6.1.2 jammy/main amd64 hsa-rocr-dev 
amd64 1.13.0.60102-119~22.04 [102 kB]
Get:5 https://repo.radeon.com/rocm/apt/6.1.2 jammy/main amd64 rocm-hip-runtime 
amd64 6.1.2.60102-119~22.04 [2 042 B]
```

So basically:

```
─ rocm-hip-runtime 6.1.2.60102-119~22.04 (AMD repository)
  └ hip-runtime-amd 6.1.40093.60102-119~22.04 (AMD repository)
├ hsa-rocr-dev 1.13.0.60102-119~22.04 (AMD repository)
│ └ /opt/rocm-6.1.2/include/hsa/hsa.h
└ hipcc 1.0.0.60102-119~22.04 (Ubuntu repository)
  └ libhsa-runtime-dev 5.0.0-1 (Ubuntu repository)
└ /usr/include/hsa/hsa.h
```

This is definitely an AMD packaging issue.

https://github.com/llvm/llvm-project/pull/95484
___
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-project/commit/61efea7142e904e6492e1ce0566ec23d9d221c1e
 .

This one line patch is enough to fix the build on LLVM 18 branch so it's 
probably a good idea to merge it, it's obvious, non-intrusive and can't do harm.

>From 8a040018e59c9cb9e745885f5292f0e7967197ee Mon Sep 17 00:00:00 2001
From: Thomas Debesse 
Date: Thu, 9 May 2024 05:18:35 +0200
Subject: [PATCH] [libclc] Fix linking against libIRReader

Fixes https://github.com/llvm/llvm-project/issues/91551.
---
 libclc/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index fa1d8e4adbcc4..b7f8bb18c2288 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -114,6 +114,7 @@ include_directories( ${LLVM_INCLUDE_DIRS} )
 set(LLVM_LINK_COMPONENTS
   BitReader
   BitWriter
+  IRReader
   Core
   Support
 )

___
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] 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] 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 https://github.com/llvm/llvm-project/issues/91551.
---
 libclc/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index fa1d8e4adbcc4..b7f8bb18c2288 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -114,6 +114,7 @@ include_directories( ${LLVM_INCLUDE_DIRS} )
 set(LLVM_LINK_COMPONENTS
   BitReader
   BitWriter
+  IRReader
   Core
   Support
 )

___
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] 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 https://github.com/llvm/llvm-project/issues/91551.
---
 libclc/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index fa1d8e4adbcc4..b7f8bb18c2288 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -114,6 +114,7 @@ include_directories( ${LLVM_INCLUDE_DIRS} )
 set(LLVM_LINK_COMPONENTS
   BitReader
   BitWriter
+  IRReader
   Core
   Support
 )

___
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] 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 https://github.com/llvm/llvm-project/issues/91551
---
 libclc/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index fa1d8e4adbcc4..b7f8bb18c2288 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -114,6 +114,7 @@ include_directories( ${LLVM_INCLUDE_DIRS} )
 set(LLVM_LINK_COMPONENTS
   BitReader
   BitWriter
+  IRReader
   Core
   Support
 )

___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits