CUDApp
CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.
Brought by drakestapleton
CUDApp / src / omega_gpu_fp8_internal.h
| 1 | #ifndef OMEGA_GPU_FP8_INTERNAL_H |
| 2 | #define OMEGA_GPU_FP8_INTERNAL_H |
| 3 | /* Library-internal helpers of omega_gpu_fp8_api.c for omega_gpu_fp8_slots.c (Expert Ribbon, omega#533). Not part of the |
| 4 | * public ABI: the slot pool owns its tensor and is the only caller. */ |
| 5 | #include "omega_gpu_fp8_api.h" |
| 6 | #include <stddef.h> |
| 7 | #include <stdint.h> |
| 8 | /* A zero-filled FP8 tensor of `experts` x [n][k] in GPU-UNCACHED memory, whatever omega_gpu_fp8_set_weight_cache says: |
| 9 | * slots are rewritten by the CPU while the process runs, and nvos.h:1117-1118 says GPU-cached system memory "will not be |
| 10 | * coherent with direct CPU mappings" (omega #457 measured 4096/4096 stale lines on a cached rewrite; uncached FRESH). */ |
| 11 | int omega_gpu_fp8_tensor_alloc_uncached(uint32_t experts, uint32_t n, uint32_t k, OmegaGpuFp8Tensor **out); |
| 12 | /* CPU views of one expert: n*k weight bytes and (n/128)*(k/128) packed f32 scales. */ |
| 13 | int omega_gpu_fp8_tensor_cpu_view(const OmegaGpuFp8Tensor *t, uint32_t expert, uint8_t **w, float **s); |
| 14 | /* CPU writes before the device reads them (platform SYNC on both buffers; Linux reference: dsb sy). 0 ok, -1. */ |
| 15 | int omega_gpu_fp8_tensor_sync_to_gpu(const OmegaGpuFp8Tensor *t); |
| 16 | #endif |