mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-27 20:02:15 +00:00
[DORT] Fix fake tensor problem cuased by PyTorch change (#15664)
This should make `Orttraining Linux Lazy Tensor CI Pipeline` green again.
This commit is contained in:
parent
3440d3a08e
commit
d0c3f92ec6
1 changed files with 3 additions and 1 deletions
|
|
@ -627,7 +627,9 @@ class OrtBackend:
|
|||
if graph_module in self._partitioner_cache:
|
||||
partitioned_prim_graph_module = self._partitioner_cache[graph_module]
|
||||
else:
|
||||
prim_graph_module = make_fx(graph_module, decomposition_table=_ATEN2ATEN_DECOMP)(*args)
|
||||
prim_graph_module = make_fx(
|
||||
graph_module, tracing_mode="fake", _allow_non_fake_inputs=True, decomposition_table=_ATEN2ATEN_DECOMP
|
||||
)(*args)
|
||||
# TODO(wechi): this is required for removing aten::_to_copy in _replace_to_copy_with_to.
|
||||
# We need input and output tensors' devices to decide if aten::_to_copy is just a Cast.
|
||||
FakeTensorProp(prim_graph_module).propagate(*args)
|
||||
|
|
|
|||
Loading…
Reference in a new issue