library("SpaNorm")
setGPUMemoryBudget(1e9)
getGPUMemoryBudget()[1] 1e+09
resetGPUCache()Explicitly sets the session-cached GPU memory budget (see getGPUMemoryBudget), bypassing auto-detection for the rest of the session, or until resetGPUCache clears it. Useful when auto-detection is unreliable – e.g. on a MIG-partitioned GPU, where nvidia-smi-based detection may not resolve the correct instance on every driver/scheduler combination – so the correct budget (e.g. read from nvidia-smi -L’s reported MIG instance size) can be set once rather than passed via gpu.mem.budget on every call.
setGPUMemoryBudget(bytes)
bytes
|
a single positive number (bytes), or Inf to disable blocking outright.
|
NULL, invisibly.