(*args, torch_fn)
| 280 | |
| 281 | |
| 282 | def make_simple_generated_case(*args, torch_fn): |
| 283 | cpp_args = tuple( |
| 284 | arg.cpp_arg if isinstance(arg, ArgForPyTorch) else arg |
| 285 | for arg in args |
| 286 | if not isinstance(arg, ArgForPyTorch) or arg.used_in_cpp() |
| 287 | ) |
| 288 | torch_args = tuple( |
| 289 | argument_to_pytorch(arg) for arg in args if not isinstance(arg, ArgForPyTorch) |
| 290 | ) |
| 291 | kwargs_for_torch_fn = dict( |
| 292 | arg.kwarg_pair |
| 293 | for arg in args |
| 294 | if isinstance(arg, ArgForPyTorch) and arg.used_in_torch() |
| 295 | ) |
| 296 | return [ |
| 297 | ( |
| 298 | "SimpleGeneratedCase", |
| 299 | *cpp_args, |
| 300 | torch_fn(*torch_args, **kwargs_for_torch_fn), |
| 301 | ShapeDynamism.STATIC, |
| 302 | ) |
| 303 | ] |
| 304 | |
| 305 | |
| 306 | def gen_test_cases(suite_name: str, op_name: str, test_cases, test_f=False): |
no test coverage detected