Files
pytorch/test/inductor/opinfo_harness.py
Xuehai Pan 134bc4fc34 [BE][Easy][12/19] enforce style for empty lines in import segments in test/i*/ (#129763)
See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501. Most changes are auto-generated by linter.

You can review these PRs via:

```bash
git diff --ignore-all-space --ignore-blank-lines HEAD~1
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/129763
Approved by: https://github.com/jansel
2024-07-18 07:49:19 +00:00

27 lines
800 B
Python

import os
import subprocess
from torch.testing._internal.common_methods_invocations import op_db
if __name__ == "__main__":
i = 0
while i < len(op_db):
start = i
end = i + 20
os.environ["PYTORCH_TEST_RANGE_START"] = f"{start}"
os.environ["PYTORCH_TEST_RANGE_END"] = f"{end}"
popen = subprocess.Popen(
["pytest", "test/inductor/test_torchinductor_opinfo.py"],
stdout=subprocess.PIPE,
)
for line in popen.stdout:
print(line.decode(), end="")
popen.stdout.close()
return_code = popen.wait()
if return_code:
raise subprocess.CalledProcessError(
return_code, ["pytest", "test/inductor/test_torchinductor_opinfo.py"]
)
i = end + 1