Remove the unnecessary deletion because automatic deletion is implicitly already there at the function end
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user