Skip to content

Commit

Permalink
remove patch code
Browse files Browse the repository at this point in the history
  • Loading branch information
anw90 committed Dec 13, 2024
1 parent 4176f1c commit 3ecf7e4
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 13 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 0 additions & 13 deletions torchacc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,3 @@ def _set_env():
patch.patch_autocast()
decompose.replace_decompose()
_set_env()

import torch

original_init = torch.autocast.__init__


def patched_init(self, device_type: str, *args, **kwargs):
if device_type == 'xla':
device_type = 'cuda'
original_init(self, device_type, *args, **kwargs)


torch.autocast.__init__ = patched_init

0 comments on commit 3ecf7e4

Please sign in to comment.