(cls)
| 63 | |
| 64 | @classmethod |
| 65 | def tearDownClass(cls): |
| 66 | if os.getenv("PYTORCH_KEEP_TMPDIR", "0") != "1": |
| 67 | shutil.rmtree(cls.DEBUG_DIR) |
| 68 | else: |
| 69 | print(f"test_minifier_common tmpdir kept at: {cls.DEBUG_DIR}") |
| 70 | cls._exit_stack.close() |
| 71 | |
| 72 | def _gen_codegen_fn_patch_code(self, device, bug_type): |
| 73 | assert bug_type in ("compile_error", "runtime_error", "accuracy") |