mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Fixes the observed graph breaks in https://github.com/pytorch/pytorch/issues/121349 and https://github.com/pytorch/pytorch/issues/121350. But there are still graph breaks since a random output is being used as a seed, e.g. ```python import random import torch def fn(x): seed = random.randint(0, 100) rand = random.Random(seed) return x + rand.randrange(10) opt_fn = torch.compile(fn, backend="eager", fullgraph=True) opt_fn(torch.ones(1)) ``` fails with ``` torch._dynamo.exc.InternalTorchDynamoError: UnspecializedPythonVariable() is not a constant ``` when tracing the line ``` rand = random.Random(seed) ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/133725 Approved by: https://github.com/jansel |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| base.py | ||
| builder.py | ||
| builtin.py | ||
| constant.py | ||
| ctx_manager.py | ||
| dicts.py | ||
| distributed.py | ||
| functions.py | ||
| higher_order_ops.py | ||
| iter.py | ||
| lazy.py | ||
| lists.py | ||
| misc.py | ||
| nn_module.py | ||
| optimizer.py | ||
| script_object.py | ||
| sdpa.py | ||
| tensor.py | ||
| torch_function.py | ||
| torch.py | ||
| user_defined.py | ||