当更多内存失效时:动态张量重计算中的隐藏可行性漏洞
When More Memory Fails: Hidden Feasibility Holes in Dynamic Tensor Rematerialization
AI总结:
该研究发现动态张量重计算(DTR)存在非单调可行性漏洞,即部分内存预算会导致训练失败,而更小或更大的预算却能成功,通过simrd模拟器复现了InceptionV4等模型的相关漏洞。
摘要:
动态张量重计算(Dynamic Tensor Rematerialization, DTR)在内存预算约束下通过驱逐张量并按需重新计算来训练神经网络。一个自然的预期是,足以完成训练的内存预算在增加时仍会保持充足。我们使用DTR的参考模拟器simrd重放公开的DTR训练轨迹,表明这一预期不成立。我们将这类例外称为可行性漏洞:即存在这样的内存预算,驱逐策略会耗尽内存,而更小和更大的预算却能完成训练,这是一种非单调可行性。在带有日期修正的写入扫描协议下,0.01步的预算网格在6条验证轨迹上均未发现DTR存在此类漏洞,尽管未解决的超时问题使其无法确立单调性。更精细的采样在InceptionV4(3个区域)和U-Net(2个区域)上发现了漏洞,此外在ResNet-32开发轨迹上也发现了1个漏洞。每个漏洞都通过3次重复和未修改的simrd得到复现。对于InceptionV4的一对情况(峰值内存分别为0.2343和0.235),我们将失败追溯到单个分配:更大的预算在某个算子处避免了一次驱逐,而更小的预算在该算子处短缺173479字节;其携带的额外数据迫使后续在3个算子后驱逐所需张量,重建该张量会触发无法容纳的重计算级联。在相同预算下保持该张量驻留可防止失败。我们测试的两种简单分数更改无法在所有轨迹上消除漏洞,且均在部分轨迹上增加了失败预算。所有结果均来自模拟,未使用分配器模型,未测试GPU硬件上的行为。
英文摘要:
Dynamic Tensor Rematerialization (DTR) trains neural networks under a memory budget by evicting tensors and recomputing them on demand. A natural expectation is that a budget large enough to complete training stays sufficient when it is increased. Using DTR's reference simulator, simrd, to replay the public DTR training traces, we show that this expectation fails. We call the exceptions feasibility holes: memory budgets at which an eviction policy runs out of memory although both a smaller and a larger budget complete, a form of non-monotone feasibility. Under a written sweep protocol with dated amendments, a 0.01-step budget grid shows no such hole for DTR on any of six confirmatory traces, although unresolved timeouts prevent it from establishing monotonicity. Finer sampling finds holes on InceptionV4 (three regions) and U-Net (two regions), in addition to one on the ResNet-32 development trace. Every hole is reproduced by three repeats and by unmodified simrd. For one InceptionV4 pair (0.2343 versus 0.235 of peak memory) we trace the failure to individual allocations. The larger budget avoids one eviction at an operator where the smaller budget was 173,479 bytes short. The extra data it carries forward forces a later eviction of a tensor needed three operators afterwards, and rebuilding that tensor triggers a recomputation cascade that cannot fit. Keeping that one tensor resident under the same budget prevents the failure. The two simple score changes we tested do not remove holes across traces; both add failing budgets on some traces. All results are from simulation, with no allocator model; behaviour on GPU hardware is untested.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。