Skip to content

Commit

Permalink
suppress errors in torchsnapshot
Browse files Browse the repository at this point in the history
Differential Revision: D49531510

fbshipit-source-id: ff8e0052107a36dbe5a4640c3d6fa251f8e37988
  • Loading branch information
generatedunixname89002005307016 authored and facebook-github-bot committed Sep 22, 2023
1 parent cde8f18 commit e5cfe05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions torchsnapshot/batcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def __init__(

async def stage_buffer(self, executor: Optional[Executor] = None) -> BufferType:
try:
# pyre-fixme[16]: Module `cuda` has no attribute `ByteTensor`.
gpu_buf = torch.cuda.ByteTensor(self.slab_sz_bytes)
except torch.cuda.OutOfMemoryError:
gpu_buf = None
Expand Down

0 comments on commit e5cfe05

Please sign in to comment.