Skip to content

Issue #434: Fix autoamp init wrapper compatibility#439

Open
karthik-ravi-1537 wants to merge 3 commits into
ndif-team:mainfrom
karthik-ravi-1537:fix-autoamp_init_wrapper-compatibility
Open

Issue #434: Fix autoamp init wrapper compatibility#439
karthik-ravi-1537 wants to merge 3 commits into
ndif-team:mainfrom
karthik-ravi-1537:fix-autoamp_init_wrapper-compatibility

Conversation

@karthik-ravi-1537

Copy link
Copy Markdown

This PR addresses an issue with the autoamp_init_wrapper function that patches PyTorch's torch.autocast.init method.

Changes:

  • Changed the function call to the torch.autocast.init (or other functions that are patched) to have the expected function signature.
  • Replaced deprecated torch.get_autocast_cpu_dtype() with the recommended torch.get_autocast_dtype('cpu')
  • Added tests for the autoamp_init_wrapper function in tests/test_autocast_patch.py.

@karthik-ravi-1537

karthik-ravi-1537 commented Jun 16, 2025

Copy link
Copy Markdown
Author

Relates to Issue #434

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant