Skip to content

Commit cc9b307

Browse files
authored
check before deleting (#59)
1 parent c12cd95 commit cc9b307

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

centml/compiler/backend.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ def remote_compilation(self):
164164
# Let garbage collector free the memory used by the uncompiled model
165165
with self.lock:
166166
del self.inputs
167-
del self.module
167+
if self.module:
168+
del self.module
168169
gc.collect()
169170
torch.cuda.empty_cache()
170171

0 commit comments

Comments
 (0)