Unverified Commit 76a611f7 authored by Yuting Jiang's avatar Yuting Jiang Committed by GitHub
Browse files

fix bug of cnn failure (#134)

**Description**
Fix bug of VGG models failed on A100 GPU with batch_size=128.

**Major Revision**
- Add synchronize before delete self.model in _postprocess of superbench/benchmarks/model_benchmarks/pytorch_base.py

**Minor Revision**
- Add if self._gpu_available check 
- Reorder del 
parent 08d25bd2
......@@ -184,11 +184,13 @@ def _postprocess(self):
)
return False
del self._model
del self._optimizer
if self._gpu_available:
torch.cuda.synchronize()
del self._target
torch.cuda.empty_cache()
del self._optimizer
del self._model
if self._gpu_available:
torch.cuda.empty_cache()
return True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment