hn.today

Extending LLDB to Debug Applications That Span CPUs and GPUs

engineering.fb.com3 points0 comments
Screenshot of Extending LLDB to Debug Applications That Span CPUs and GPUs

Meta’s LLDB work addresses the difficulty of debugging programs that move between CPU code and GPU kernels, where processors have different instruction sets, registers, memory spaces, and execution models. Rather than forcing both into one artificial process, the design represents the CPU and accelerator as separate LLDB targets, each with its own architecture, threads, registers, memory, and execution state. Developers can still manage both within a single LLDB or IDE session, while the debugger preserves their distinct characteristics, including independent address spaces.

The central contribution is a vendor-neutral plugin framework in lldb-server, LLDB’s companion process for low-level debugging. A hardware-specific plugin connects to the vendor’s runtime and debugging APIs, coordinates host events such as kernel launch, and exposes device state through LLDB’s existing abstractions. This lets shared features - including commands, symbol handling, and IDE support - serve different accelerators without requiring each vendor to maintain a separate debugger; CPU-only programs remain on the existing path without added runtime overhead. A mock plugin enables hardware-independent tests, and the framework also supports GPU core dumps. Most common infrastructure has been contributed upstream to LLVM, including plugin discovery, host-device coordination, multiple address spaces, and tests. The next step is completing the upstream work and expanding vendor integrations.

Read on engineering.fb.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Ggml v1.0.0

Ggml v1.0.0

ggml 1.0.0 removes deprecated public APIs and legacy DIAG_MASK operations, while adding configurable YaRN truncation and FP8 support. It also improves backend performance with quantized matrix multiplication, fused MoE operations, and new attention and scheduling paths. (github.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.