From 9381ae6b885b43d6dd21532b533d51e6aab97787 Mon Sep 17 00:00:00 2001 From: yangliwei Date: Wed, 20 Nov 2024 17:49:34 +0800 Subject: [PATCH] Remove the unnecessary deletion because automatic deletion is implicitly already there at the function end --- src/qibotn/eval.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/qibotn/eval.py b/src/qibotn/eval.py index 9aa0136..d9d93c4 100644 --- a/src/qibotn/eval.py +++ b/src/qibotn/eval.py @@ -125,9 +125,6 @@ def dense_vector_tn_MPI(qibo_circ, datatype, n_samples=8): # Sum the partial contribution from each process on root. result = comm.reduce(sendobj=result, op=MPI.SUM, root=root) - del network - mempool.free_all_blocks() - return result, rank @@ -227,9 +224,6 @@ def dense_vector_tn_nccl(qibo_circ, datatype, n_samples=8): stream_ptr, ) - del network - mempool.free_all_blocks() - return result, rank @@ -336,9 +330,6 @@ def expectation_pauli_tn_nccl(qibo_circ, datatype, pauli_string_pattern, n_sampl stream_ptr, ) - del network - mempool.free_all_blocks() - return result, rank @@ -431,9 +422,6 @@ def expectation_pauli_tn_MPI(qibo_circ, datatype, pauli_string_pattern, n_sample # Sum the partial contribution from each process on root. result = comm.reduce(sendobj=result, op=MPI.SUM, root=root) - del network - mempool.free_all_blocks() - return result, rank