viable/strict/1788468668: [dynamo] Index bytecode constants by identity (#195622)
- PyTorch 近 90 天出现 489 次
- PyTorch 近 90 天第 484 次发版
- 上一次:同一天稍早 · viable/strict/1788467170: [Docs] Update build and CI persons of interest (#195860)
发生了什么
Bytecode assembly located every LOAD_CONST by linearly scanning the growing constant tuple. Large generated functions therefore spent quadratic time in constant lookup. Build an identity-to-index table once per assembly and update it when constants are appended. Object identity remains the key because equal constants can have different semantics, and unlike hashing it also supports unhashable constants. Test Plan: p…
摘要按规则整理自下方来源原文