Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 17 — GPU Detection and Performance Profiling

Figure 17.1 — GPU Detection and Performance Profiling

CFDrs builds on the Atlas stack: purpose-built crates sharing one trait frontier ([eunomia::RealField]) and one set of zero-cost abstractions. This chapter states the performance contract those crates are held to, maps which crate owns which layer, and points at the runnable benchmarks that measure it.

Performance Mandate

Atlas is held to a strict performance contract:

  • Zero heap allocations on hot paths. All transient storage lives in [mnemosyne::Arena] sub-arenas.
  • Zero virtual dispatch on numeric kernels. Trait specialization through [eunomia] gives the compiler monomorphized code per scalar type and backend.
  • Zero copy for read-only views. [Cow] over [leto::NdArray] eliminates clone() calls in adjoint passes.
  • Zero abstraction tax. Const generics, ZSTs, and GATs encode capability and lifetime variance at the type level — there is no runtime machinery to charge.

A claim against any of these is settled by measurement, not assertion: the examples below carry the benchmarks, and a regression in them is a defect in the solver path rather than a budget to raise.

Atlas Crate Layers

LayerCrate(s)CFDrs consumer
Numeric traitseunomia::RealFieldevery type
Dense/sparse storageleto::NdArray, leto::CsrMatrix, leto::DMatrixcfd-math, cfd-1d, cfd-2d, cfd-3d
Geometryleto::Point3, Vector3, Isometry3cfd-schematics, cfd-3d
SIMDhermes-simd lanescfd-2d::stencil, cfd-3d::fem, cfd-1d::kernel
Memorymnemosyne::Arena, themis::Placementevery crate
Concurrencymoirai::Executor, task graphcfd-2d::parallel, cfd-3d::parallel
FFTapollo::FftPlancfd-3d::spectral, cfd-2d::spectral

(Tensors, autodiff, GPU backends, and image I/O — included in the full Atlas stack — are used by helios and kwavers but not by CFDrs; see Atlas Dependency Map for surface compatibility.)

Examples Referenced by This Chapter

Further Reading