()
| 1112 | |
| 1113 | |
| 1114 | def parse_args(): |
| 1115 | parser = argparse.ArgumentParser( |
| 1116 | description="Run the PyTorch unit test suite", |
| 1117 | epilog="where TESTS is any of: {}".format(", ".join(TESTS)), |
| 1118 | formatter_class=argparse.RawTextHelpFormatter, |
| 1119 | parents=[common_parser], |
| 1120 | ) |
| 1121 | parser.add_argument( |
| 1122 | "-v", |
| 1123 | "--verbose", |
| 1124 | action="count", |
| 1125 | default=0, |
| 1126 | help="Print verbose information and test-by-test results", |
| 1127 | ) |
| 1128 | parser.add_argument("--jit", "--jit", action="store_true", help="run all jit tests") |
| 1129 | parser.add_argument( |
| 1130 | "--distributed-tests", |
| 1131 | "--distributed-tests", |
| 1132 | action="store_true", |
| 1133 | help="Run all distributed tests", |
| 1134 | ) |
| 1135 | parser.add_argument( |
| 1136 | "--functorch", |
| 1137 | "--functorch", |
| 1138 | action="store_true", |
| 1139 | help=( |
| 1140 | "If this flag is present, we will only run functorch tests. " |
| 1141 | "If this flag is not present, we will run all tests " |
| 1142 | "(including functorch tests)." |
| 1143 | ), |
| 1144 | ) |
| 1145 | parser.add_argument( |
| 1146 | "--mps", |
| 1147 | "--mps", |
| 1148 | action="store_true", |
| 1149 | help=("If this flag is present, we will only run test_mps and test_metal"), |
| 1150 | ) |
| 1151 | parser.add_argument( |
| 1152 | "--cpp", |
| 1153 | "--cpp", |
| 1154 | action="store_true", |
| 1155 | help=("If this flag is present, we will only run C++ tests"), |
| 1156 | ) |
| 1157 | parser.add_argument( |
| 1158 | "-core", |
| 1159 | "--core", |
| 1160 | action="store_true", |
| 1161 | help="Only run core tests, or tests that validate PyTorch's ops, modules," |
| 1162 | "and autograd. They are defined by CORE_TEST_LIST.", |
| 1163 | ) |
| 1164 | parser.add_argument( |
| 1165 | "--onnx", |
| 1166 | "--onnx", |
| 1167 | action="store_true", |
| 1168 | help=( |
| 1169 | "Only run ONNX tests, or tests that validate PyTorch's ONNX export. " |
| 1170 | "If this flag is not present, we will exclude ONNX tests." |
| 1171 | ), |
no test coverage detected
searching dependent graphs…