mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
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
27 lines
800 B
Python
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
|