pytorch
0a479d9b - Simplify minifier testing by incorporating fault injection in prod code (#100357)

Commit
1 year ago
Simplify minifier testing by incorporating fault injection in prod code (#100357) Previously, minifier testing injected faults by injecting extra code into the repro scripts, and then ensuring this code got propagated to all subsequent subprocess calls. This was not only quite complicated, but also induced a big slowdown on the minifier, because to inject the faults, you had to import torch._inductor, which would cause the compilation threads to immediately get initialized before you even got to do anything else in the repro script. This new approach fixes this problem by incorporating the fault injection into "prod" code. Essentially, for inductor fault injection we introduce some new config flags that let you "configure" Inductor to be buggy; for Dynamo fault injection we just permanently keep the buggy testing backends registered. This is MUCH simpler: we only have to propagate the buggy config (which is something we're already doing), and it saves the minifier scripts from having to immediately initialize inductor on entry. Also, I enable the test for Triton runtime errors, now that tl.assert_device is here. Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/100357 Approved by: https://github.com/voznesenskym
Author
Committer
Parents
Loading