"include/vscode:/vscode.git/clone" did not exist on "5b5d62f19019a398167df1f1b59279e049bf24ce"
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): ...@@ -184,11 +184,13 @@ def _postprocess(self):
) )
return False return False
del self._model if self._gpu_available:
del self._optimizer torch.cuda.synchronize()
del self._target del self._target
del self._optimizer
torch.cuda.empty_cache() del self._model
if self._gpu_available:
torch.cuda.empty_cache()
return True 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