Skip to content

Commit

Permalink
yolov3: reduce batch size due to OOM
Browse files Browse the repository at this point in the history
  • Loading branch information
xmfan committed Oct 23, 2023
1 parent b5631ed commit fe396c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions torchbenchmark/models/yolov3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Model(BenchmarkModel):
task = COMPUTER_VISION.SEGMENTATION
# Original train batch size: 16
# Source: https://github.com/ultralytics/yolov3/blob/master/train.py#L447
DEFAULT_TRAIN_BSIZE = 16
DEFAULT_TRAIN_BSIZE = 8 # reduced from 16 to 8 due to OOM in TorchInductor dashboard
DEFAULT_EVAL_BSIZE = 8
# yolov3 CUDA inference test uses amp precision
DEFAULT_EVAL_CUDA_PRECISION = "amp"
Expand Down Expand Up @@ -102,6 +102,4 @@ def eval(self) -> Tuple[torch.Tensor]:
def device_str(self):
"""YoloV3 uses individual GPU indices."""
return str(
torch.cuda.current_device() if self.device == "cuda"
else self.device
)
torch.cuda.current_device() if

0 comments on commit fe396c3

Please sign in to comment.