# 使用 Homebrew, apk, dnf, pacman 安装 opencl-icd-loader

查看 opencl-icd-loader 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:opencl-icd-loader
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install opencl-icd-loader
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add opencl-icd-loader
```

  证据: Alpine Linux edge package indexes: opencl-icd-loader from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install OpenCL-ICD-Loader
```

  证据: Fedora Rawhide package metadata: OpenCL-ICD-Loader from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S ocl-icd
```

  证据: Arch Linux sync databases: ocl-icd from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:opencl-icd-loader
- **软件包管理器:** Homebrew
- **版本:** 2026.05.29
- **来源摘要:** OpenCL Installable Client Driver (ICD) Loader
- **主页:** <https://www.khronos.org/registry/OpenCL/>
- **仓库:** <https://github.com/KhronosGroup/OpenCL-ICD-Loader>
- **最后更新:** 2026-06-25T13:37:58+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cllayerinfo (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2026.05.29
## 项目历史与用法

OpenCL ICD Loader is the Khronos official loader library that exports OpenCL API entry points, enumerates installed OpenCL implementations, and dispatches calls to vendor Installable Client Drivers.

### 项目历史

The need for an ICD loader came from OpenCL's multi-vendor model: a single system may have OpenCL implementations from CPU, GPU, FPGA, or accelerator vendors. Khronos announced the OpenCL Installable Client Driver loader in 2012, describing it as the library that lets applications choose among installed platforms and dispatch calls to the underlying implementation.

The Khronos GitHub repository packages that mechanism as source code and tests for the official OpenCL ICD Loader. The README is careful about scope: the loader is not an OpenCL implementation, so users must install at least one vendor ICD supporting the `cl_khr_icd` extension.

### 采用历史

The `cl_khr_icd` extension specification describes the ICD Loader as a demultiplexor that exposes platform IDs from multiple vendor implementations to applications linked against the loader. That role made `libOpenCL.so`/OpenCL loader packages a standard dependency for portable OpenCL applications on systems where the actual compute runtime comes from a separate vendor package.

Package managers often split the OpenCL ecosystem into headers, the ICD loader, and vendor runtimes. That split lets a program build and link once while the user's machine decides at runtime whether Intel, AMD, NVIDIA, POCL, FPGA, or other OpenCL providers are available.

### 使用方式

Developers link applications against the ICD loader instead of a specific vendor OpenCL library. At runtime the loader enumerates vendor ICDs, exposes OpenCL entry points, and routes calls to the implementation associated with the platform, context, queue, memory object, or other ICD-compatible object.

Operators and developers use the package to make OpenCL discovery work in heterogeneous installations. The Homebrew package also installs `cllayerinfo`, a Khronos diagnostic tool for inspecting OpenCL layers and loader behavior.

### 为什么软件包爱好者会关心

This is a tiny-looking package with a huge dependency-graph job. Without an ICD loader, every OpenCL consumer would have to choose a vendor implementation at link time or ship awkward runtime glue. With it, distributions can package OpenCL like Vulkan and OpenGL loader stacks: neutral loader first, vendor implementations separately.

It is especially important in reproducible build and CI images because installing headers and the loader is enough to compile and link many OpenCL applications even when no GPU runtime is present. Runtime capability remains a deployment concern.

### 时间线

- 2012: Khronos published news for the OpenCL Installable Client Driver loader and source availability.
- OpenCL extension era: `cl_khr_icd` defined the mechanism for multiple vendor ICDs behind one loader.
- GitHub era: KhronosGroup/OpenCL-ICD-Loader became the canonical source repository and test location for the official loader.

### Related projects

- Related projects include OpenCL-Headers, OpenCL-CLHPP, OpenCL-SDK, vendor OpenCL runtimes, POCL, and higher-level compute stacks such as SYCL implementations that rely on OpenCL platforms on some systems.

### 来源

- <https://formulae.brew.sh/formula/opencl-icd-loader>
- <https://github.com/KhronosGroup/OpenCL-ICD-Loader>
- <https://registry.khronos.org/OpenCL/specs/unified/refpages/man/html/cl_khr_icd.html>
- <https://www.khronos.org/news/permalink/opencl-installable-client-driver-icd-loader>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 其他软件包管理器记录

- apk - cllayerinfo - 2.3.3-r0: normalized package name match | Alpine Linux edge package indexes: cllayerinfo from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generic OpenCL ICD Loader | https://github.com/OCL-dev/ocl-icd
- apk - opencl-icd-loader - 2.3.3-r0: normalized package name match | Alpine Linux edge package indexes: opencl-icd-loader from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generic OpenCL ICD Loader | https://github.com/OCL-dev/ocl-icd
- apk - opencl-icd-loader-dev - 2.3.3-r0: normalized package name match | Alpine Linux edge package indexes: opencl-icd-loader-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generic OpenCL ICD Loader (development files) | https://github.com/OCL-dev/ocl-icd
- apk - opencl-icd-loader-doc - 2.3.3-r0: normalized package name match | Alpine Linux edge package indexes: opencl-icd-loader-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generic OpenCL ICD Loader (documentation) | https://github.com/OCL-dev/ocl-icd
- dnf - OpenCL-ICD-Loader - 3.1-1.20260519gitb7bd280.fc45: normalized package name match | Fedora Rawhide package metadata: OpenCL-ICD-Loader from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Khronos official OpenCL ICD Loader | https://github.com/KhronosGroup/OpenCL-ICD-Loader
- dnf - OpenCL-ICD-Loader-devel - 3.1-1.20260519gitb7bd280.fc45: normalized package name match | Fedora Rawhide package metadata: OpenCL-ICD-Loader-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for Khronos official OpenCL ICD Loader | https://github.com/KhronosGroup/OpenCL-ICD-Loader
- pacman - ocl-icd - 2.3.5-1: normalized package name match | Arch Linux sync databases: ocl-icd from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | OpenCL ICD Bindings | https://github.com/OCL-dev/ocl-icd


## Combined YAML source

View the package source record on GitHub. [combined/opencl-icd-loader.yml](https://github.com/mxcl/pkgdb/blob/main/combined/opencl-icd-loader.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
