引導式測驗 · 中等 等級
GPU 記憶體管理與碎片測驗
測試 GPU 分配與保留記憶體、分配器重複使用和碎片診斷,包括empty_cache 和可擴充段的限制。
問題 1 的 8
什麼是 GPU 記憶體碎片?
預覽每個問題8 問題
當您參加測驗時,就會出現答案和解釋。
- 什麼是 GPU 記憶體碎片?
- 當 GPU 發生物理損壞時
- 當模型層數過多時
- 當兩個 GPU 對結果不一致時
- 當空閒記憶體被分割成太小的分散塊而無法滿足大的連續請求時
- 為什麼像 PyTorch 這樣的框架使用快取記憶體分配器?
- 為了使模型更準確
- 透過重複使用池記憶體區塊來避免緩慢的直接驅動程式分配/釋放調用
- 對權重進行加密
- 將所需 GPU 數量減少到 1 個
- 儘管明顯未使用保留內存,但 CUDA 分配仍失敗。開發商該調查什麼?
- Whether fragmentation is proven by the error alone
- Whether all live tensors have already been freed
- Whether inactive split blocks or other allocations explain the failure
- Whether changing the learning rate releases GPU memory
- 可以測試哪個 PyTorch 分配器選項來測試大小變化的工作負載,從而留下未使用的記憶體?
- Expandable segments in the allocator configuration
- Increasing every tensor dimension
- Disabling the GPU cooling system
- Increasing the optimizer learning rate
- vLLM 的 PagedAttention 如何減少推理過程中的記憶浪費?
- 模型的訓練數據
- 注意力鍵值(KV)緩存,使用固定大小的頁面
- GPU 的時脈速度
- 日誌的字體大小
- 哪種技術可以減少啟動記憶體以幫助避免記憶體不足錯誤?
- 增加更多層
- 使用更長的學習率預熱
- 梯度檢查點(重新計算)
- 將更多檢查點儲存到磁碟
- A live CUDA tensor still has Python references. Will empty_cache release that tensor’s allocation?
- No; it releases unused cached memory rather than live tensor storage
- Yes; it deletes every referenced tensor
- Yes; it moves the tensor automatically to NVMe
- Only if the tensor contains zero values
- PyTorch reports reserved memory greater than allocated memory. What distinction explains the gap?
- Reserved memory measures only CPU RAM
- Allocated memory includes every process on the GPU
- The difference directly proves a model accuracy error
- The allocator can retain cached blocks beyond memory currently used by tensors