# 使用 Homebrew, apt 安装 oclgrind

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

## 安装

```sh
sudo av install brew:oclgrind
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install oclgrind
```

  证据: local Homebrew formula metadata

### Linux

- Ubuntu apt (92%):

```sh
sudo apt install oclgrind
```

  证据: Ubuntu 24.04 LTS package indexes: oclgrind from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

## 软件包事实

- **软件包键:** brew:oclgrind
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/oclgrind>
- **版本:** 26.03.1
- **来源摘要:** OpenCL device simulator and debugger
- **主页:** <https://github.com/jrprice/Oclgrind>
- **仓库:** <https://github.com/jrprice/Oclgrind>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://github.com/jrprice/Oclgrind/archive/refs/tags/v26.03.1.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- oclgrind (cli)
- oclgrind-kernel (cli)
- oclgrind (别名)
- oclgrind-kernel (别名)

## 依赖

- llvm@19
- readline
- zstd

## 构建依赖

- cmake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 26.03.1
- 本地数据: OK
- 上游仓库: https://github.com/jrprice/Oclgrind
- 检测到的最新版本: v26.03.1 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

Oclgrind is an OpenCL device simulator and debugger. It runs OpenCL kernels on a virtual device backed by an LLVM IR interpreter, trading speed for observability and deterministic debugging.

### 项目历史

The upstream README says Oclgrind was originally created by James Price and Simon McIntosh-Smith at the University of Bristol. It implements a virtual OpenCL device, an OpenCL runtime with ICD support, and a platform for OpenCL development tools.

The project's feature set grew around hard-to-debug GPU programming failures: invalid memory accesses, data races, barrier divergence, instruction histograms, and interactive kernel debugging. Its architecture interprets an abstract intermediate representation rather than running on a particular GPU, making it useful for portability and correctness checks.

Release notes and build documentation show Oclgrind tracking LLVM and Clang over time. The README requires LLVM and Clang 18.0 or newer for source builds, while older release notes such as v15.5 mention updates to LLVM 3.6, illustrating the tool's long dependency relationship with the LLVM compiler stack.

### 采用历史

Oclgrind is a specialist tool, but it is recognized in OpenCL developer materials as a way to debug kernels without relying on vendor-specific GPU debuggers. Codeplay's SYCL/OpenCL debugging guide describes it as a go-to tool for simulating OpenCL execution and investigating portability issues.

Homebrew's formula API generated on 2026-07-01 lists stable version 26.03.1, the `oclgrind` and `oclgrind-kernel` executables, and 67 installs over 365 days. That low package-manager count fits a niche developer-debugging tool rather than a runtime dependency.

### 使用方式

The normal workflow is to prefix an OpenCL application with `oclgrind`, causing the application to see Oclgrind as its OpenCL platform and device. Invalid memory accesses are reported to stderr with kernel, work-item, instruction, and source-line context when debug information is available.

Developers can install an ICD loading point so Oclgrind appears alongside other OpenCL platforms, or run it in interactive mode with a GDB-style session. The README warns that interpretation and bounds checking can be orders of magnitude slower than regular CPU execution, so users usually debug reduced problem sizes.

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

For package metadata, Oclgrind is notable because it is both a command-line debugger and an OpenCL ICD participant. It depends on heavyweight compiler infrastructure, exposes executable tools, and intersects with OpenCL loader configuration rather than behaving like a simple standalone CLI.

### 时间线

- University of Bristol origin: the README credits James Price and Simon McIntosh-Smith as original creators.
- 2015-05-17: v15.5 release notes mention an LLVM 3.6 update, OpenCL C compiler improvements, performance work, atomic race fixes, and interactive debugger behavior changes.
- 2026-07-01: Homebrew formula metadata lists stable version 26.03.1 with LLVM-related dependencies.

### Related projects

- Oclgrind is related to OpenCL ICD loaders, LLVM, Clang, SYCL/OpenCL developer tooling, and OpenCL debugging and analysis tools such as vendor debuggers and intercept layers.

### 来源

- <https://developer.codeplay.com/products/computecpp/ce/2.1.0/guides/sycl-guide/debugging/debugging-on-an-opencl-device.html>
- <https://formulae.brew.sh/api/formula/oclgrind.json>
- <https://github.com/OpenCL/OpenCL/blob/master/OpenCL.md>
- <https://github.com/jrprice/Oclgrind/releases>
- <https://raw.githubusercontent.com/jrprice/Oclgrind/master/README.md>


## 安全说明

escape, surveillance, or offensive capability signal.

- **Geiger 风险:** red / 中
- escape, surveillance, or offensive capability signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** oclgrind
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Ubuntu apt - liboclgrind-21.10t64 - 21.10-4: normalized package name match | Ubuntu 24.04 LTS package indexes: liboclgrind-21.10t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | core library for Oclgrind | https://github.com/jrprice/Oclgrind
- Ubuntu apt - liboclgrind-dev - 21.10-4: normalized package name match | Ubuntu 24.04 LTS package indexes: liboclgrind-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | development files for Oclgrind | https://github.com/jrprice/Oclgrind
- Ubuntu apt - oclgrind - 21.10-4: normalized package name match | Ubuntu 24.04 LTS package indexes: oclgrind from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenCL device simulator | https://github.com/jrprice/Oclgrind


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [zstd](https://pkg.so/zh-hans/brew/zstd/) - Runtime dependency declared by Homebrew.
- [llvm@19](https://pkg.so/zh-hans/brew/llvm-19/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [delve](https://pkg.so/zh-hans/brew/delve/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [arm-none-eabi-gdb](https://pkg.so/zh-hans/brew/arm-none-eabi-gdb/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [aarch64-elf-gdb](https://pkg.so/zh-hans/brew/aarch64-elf-gdb/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [ddd](https://pkg.so/zh-hans/brew/ddd/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [cgdb](https://pkg.so/zh-hans/brew/cgdb/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [mspdebug](https://pkg.so/zh-hans/brew/mspdebug/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [remake](https://pkg.so/zh-hans/brew/remake/) - Shares pkgdb curated category or tags: cli, debugger, debugging, developer-tools.
- [dwarfutils](https://pkg.so/zh-hans/brew/dwarfutils/) - Shares pkgdb curated category or tags: cli, debugging, developer-tools.
- [alive2](https://pkg.so/zh-hans/brew/alive2/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, llvm, zstd.
- [chdig](https://pkg.so/zh-hans/brew/chdig/) - Local package facts share a topical domain. Shared terms: cli, debugging, developer, developer-tools.

## Combined YAML source

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


## 来源

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