Remove the unnecessary deletion because automatic deletion is implicitly already there at the function end

This commit is contained in:
yangliwei
2024-11-20 17:49:34 +08:00
committed by tankya2
parent 17717ae37a
commit 9381ae6b88

View File

@@ -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