Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
razarmehr committed Aug 7, 2023
1 parent 364c20d commit 49fb3f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion torch/mps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ def driver_allocated_memory() -> int:
"set_per_process_memory_fraction",
"current_allocated_memory",
"driver_allocated_memory",
"Event",
"Event",
"profiler",
]
3 changes: 2 additions & 1 deletion torch/mps/event.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch


class Event:
r"""Wrapper around an MPS event.
Expand All @@ -16,7 +17,7 @@ def __init__(self, enable_timing=False):

def __del__(self):
# checks if torch._C is already destroyed
if hasattr(torch._C, '_mps_releaseEvent') and self.__eventId > 0:
if hasattr(torch._C, "_mps_releaseEvent") and self.__eventId > 0:
torch._C._mps_releaseEvent(self.__eventId)

def record(self):
Expand Down

0 comments on commit 49fb3f6

Please sign in to comment.