• ricardoV94's avatar
    scan_save_mem_rewrite: short-circuit mit-mot · 9004e5f2
    ricardoV94 提交于
    mit-mot outputs are never memory optimized. Skipping these outputs lets us get rid of two faulty logical branches that existed to mask each:
    1. an `if i <= op.info.n_mit_mot:` inside an `else` branch. This was logically wrong in that it included the first non mit-mot output (should have been <, not <=). When this was the output of a while scan it created an artificial dependency on the scan output shape, and didn't allow the rewrite to happen.
    2. because of this the outer `if(i <= op.info.n_mit_mot and ...)` had been added to sidestep this artificial dependency. The comment mentioned in was supposed to specifically handle sit-sot/mit-sot of while loops, but it was again looking at all mit-mots + first non mit-mot input. It was logically wrong but canceled the first logical mistake.
    
    If we remove both things just work.
    9004e5f2
名称
最后提交
最后更新
..
__init__.py 正在载入提交数据...
test_basic.py 正在载入提交数据...
test_checkpoints.py 正在载入提交数据...
test_printing.py 正在载入提交数据...
test_rewriting.py 正在载入提交数据...
test_utils.py 正在载入提交数据...
test_views.py 正在载入提交数据...