Skip to content

Architectures API

AtmosTransport.Architectures Module
julia
Architectures

Execution architectures and their optional runtime integration.

An architecture is part of a grid's type-level model contract: CPU() selects host execution, while GPU(:cuda) and GPU(:metal) select a concrete GPU runtime. The same object controls array adaptation, device synchronization, and runtime validation, so grid metadata cannot diverge from model storage.

source
AtmosTransport.Architectures.CPU Type
julia
struct CPU <: AtmosTransport.Architectures.AbstractArchitecture

Host CPU execution architecture.

source
AtmosTransport.Architectures.GPU Type
julia
struct GPU{B} <: AtmosTransport.Architectures.AbstractArchitecture

GPU execution architecture for backend B.

Construct with GPU(:cuda) or GPU(:metal). Making the backend explicit keeps CUDA and Metal methods unambiguous when both optional packages are loaded.

source
AtmosTransport.Architectures.architecture_from_config Method
julia
architecture_from_config(config) -> AbstractArchitecture

Resolve an [architecture] configuration table to one concrete execution architecture. An omitted backend selects CPU() unless use_gpu = true, in which case a usable GPU runtime is detected.

source
AtmosTransport.Architectures.assert_residency! Method
julia
assert_residency!(storage, architecture; label="storage")

Verify that an array or tuple of arrays is resident on architecture. CPU storage is returned directly; a GPU mismatch aborts rather than falling back silently to host execution.

source
AtmosTransport.Architectures.autodetect_gpu_architecture Method
julia
autodetect_gpu_architecture() -> GPU

Return the first functional supported GPU architecture on this host.

source
AtmosTransport.Architectures.reclaim_backend_pool! Method
julia
reclaim_backend_pool!(reference_array)

Release device allocator caches associated with reference_array after startup transients become unreachable. CPU arrays are a no-op.

source