Trusted CUDA Runtime Boundary #
This module contains the opaque CUDA buffer type used by the native runtime. Buffers are created by
explicit FFI allocation/copy functions. The nonemptiness witness below is only what Lean needs to
declare extern functions returning Buffer; it is not a default CUDA allocation and should not be
used as one.
Opaque handle to a contiguous float32 buffer (CUDA device memory when built with -K cuda=true,
otherwise a CPU stub buffer).
Implementation:
- CUDA:
csrc/cuda/tensor/torchlean_cuda_tensor.cu - CPU stub (default
lake build):csrc/cuda/tensor/torchlean_cuda_tensor_stub.c