(expr)
| 274 | |
| 275 | @register_functional_loader(("megengine.functional.tensor", "linspace")) |
| 276 | def linespace_loader(expr): |
| 277 | args, kwargs = expr.args, expr.kwargs |
| 278 | if not hasattr(expr, "version"): |
| 279 | |
| 280 | def orig_linspace_signature(start, stop, num, dtype="float32", device=None): |
| 281 | pass |
| 282 | |
| 283 | args, kwargs = _convert_kwargs_to_args( |
| 284 | orig_linspace_signature, expr.args, expr.kwargs |
| 285 | ) |
| 286 | expr.set_args_kwargs(*args, **kwargs) |
| 287 | if len(args) == 5: |
| 288 | new_args = args[0:-2] |
| 289 | new_kwargs = {"dtype": args[-2], "device": args[-1]} |
| 290 | expr.set_args_kwargs(*new_args, **new_kwargs) |
| 291 | |
| 292 | |
| 293 | @register_functional_loader(("megengine.functional.tensor", "full")) |
nothing calls this directly
no test coverage detected