txgsync's picture
download
raw
599 Bytes
// engine/vram.h - the VRAM that a CUDA engine keeps free for other users of the GPU (the desktop, other programs).
#pragma once
#include <stdlib.h>
#include <cuda_runtime_api.h>
// NSLM_VRAM_RESERVE_MB; else 2560 MB on a GPU that drives a display (it has a kernel time limit: WDDM, X11); else 512
static inline double nslm_vram_reserve_mb(void) {
const char* s = getenv("NSLM_VRAM_RESERVE_MB");
int dev = 0, limit = 0;
if (s) return atof(s);
cudaGetDevice(&dev);
return cudaDeviceGetAttribute(&limit, cudaDevAttrKernelExecTimeout, dev) == cudaSuccess && limit ? 2560 : 512;
}

Xet Storage Details

Size:
599 Bytes
·
Xet hash:
c348244a9aff9b0b62974f4d7a2104cd4f202e106a7ae7535b5557a7a0196bd8

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.