| commit | bd788dbf516be98044254336f54b72d077f69771 | [log] [tgz] |
|---|---|---|
| author | Harmen Stoppels <me@harmenstoppels.nl> | Wed Apr 02 09:52:27 2025 +0200 |
| committer | GitHub <noreply@github.com> | Wed Apr 02 14:52:27 2025 +0700 |
| tree | 65ac88f4318ef7521b6c50d5f5254bccc5ead8f6 | |
| parent | 8a691cc6157b2c3bc91af767eb1154d7a715562a [diff] |
[AMDGPU] Remove detection of hip runtime for Spack (#133263) There is special logic to detect the hip runtime when llvm is installed with Spack. It works by matching the install prefix of llvm against `llvm-amdgpu-*` followed by effectively globbing for ``` <llvm dir>/../hip-x.y.z-*/ ``` and checking there is exactly one such directory. I would suggest to remove autodetection for the following reasons: 1. In the Spack ecosystem it's by design that every package lives in its own prefix, and can only know where its dependencies are installed, it has no clue what its dependents are and where they are installed. This heuristic detection breaks that invariant, since `hip` is a dependent of `llvm`, and can be surprising to Spack users. 2. The detection can lead to false positives, since users can be using an llvm installed "upstream" with their own build of hip locally, and they may not realize that clang is picking up upstream hip instead of their local copy. 3. It only works if the directory name is `llvm-amdgpu-*` which happens to be the name of AMD's fork of `llvm`, so it makes no sense that this code lives in the main LLVM repo for which the Spack package name is `llvm`. Feels wrong that LLVM knows about Spack package names, which can change over time. 4. Users can change the install directory structure, meaning that this detection is not robust under config changes in Spack.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.