Skip to content

Commit e8bd8d1

Browse files
feat: call torch.cuda.empty_cache() per design when empty_cache_per_design=True
1 parent e302673 commit e8bd8d1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

scripts/run_inference.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ def main(conf: HydraConfig) -> None:
188188
chain_ids=sampler.chain_idx,
189189
)
190190

191+
if conf.inference.empty_cache_per_design and torch.cuda.is_available():
192+
torch.cuda.empty_cache()
193+
191194
log.info(f"Finished design in {(time.time()-start_time)/60:.2f} minutes")
192195

193196

0 commit comments

Comments
 (0)