From 8becb732931bbab5dd75cca5f5e7c75b2516d10b Mon Sep 17 00:00:00 2001 From: Nitish Shirish Keskar Date: Thu, 19 Mar 2020 15:25:30 -0700 Subject: [PATCH] removing torch.cuda.empty_cache() from TF function (#3267) torch.cuda.empty_cache() was being called from a TF function (even when torch is unavailable) not sure any replacement is needed if TF OOMs --- examples/benchmarks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/benchmarks.py b/examples/benchmarks.py index bf204b4865..b5eec4566a 100644 --- a/examples/benchmarks.py +++ b/examples/benchmarks.py @@ -532,7 +532,6 @@ def _compute_tensorflow( except tf.errors.ResourceExhaustedError as e: print("Doesn't fit on GPU.", e) - torch.cuda.empty_cache() dictionary[model_name]["results"][batch_size][slice_size] = "N/A" dictionary[model_name]["memory"][batch_size][slice_size] = "N/A" return dictionary