Skip to content

Decomposition slows down lazy tensor tracing when using Adam optimizer #8755

@lukeliu15

Description

@lukeliu15

🐛 Bug

Tracing time slows down significantly when using Adam optimizer.

This issue was originally reported here: https://dev-discuss.pytorch.org/t/decomposition-slows-down-the-lazy-tensor-tracing/1788

It seems that this torch-xla team started looking into this issue as of the 2.1 dev release notes: https://dev-discuss.pytorch.org/t/pytorch-xla-2-1-release-dev-update/1568#optimizer-tracing-time-regression-47
Are there any updates?

To Reproduce

Reproducible command can be found in the thread: https://dev-discuss.pytorch.org/t/decomposition-slows-down-the-lazy-tensor-tracing/1788/3

Expected behavior

No decomposition of aten::lerp_ and no tracing time regression.

Environment

  • Reproducible on XLA backend [CPU/TPU/CUDA]: CUDA
  • torch_xla version: 2.5.1

Additional context

Currently the workaround is to specify os.environ["XLA_DISABLE_FUNCTIONALIZATION"] = "1", but this flag is expected to go away and this flag currently breaks other parts of our model.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions