Loading namsa/msa.py +12 −3 Original line number Diff line number Diff line Loading @@ -338,9 +338,10 @@ class MSAHybrid(MSA): @staticmethod def clean_up(ctx): ctx.pop() ctx.detach() ctx = None from pycuda.tools import clear_context_caches clear_context_caches() ctx.detach() def plan_simulation(self, num_probes=None): if num_probes is None: Loading Loading @@ -750,6 +751,14 @@ class MSAGPU(MSAHybrid): simplefilter('ignore') catch_warn() self.probes = self.probes.astype(np.float32) # discard imaginary # clean up device variables self.pot_dev_ptr.free() mask_d.free() propag_d.free() psi_k_d.free() grid_range_d.free() grid_steps_d.free() ones_d.free() def __propagate_beams(self, num_probes, batch, psi_pos_d, propag_d, psi_k_d, norm_const_d, grid_steps_d, grid_range_d, Loading Loading
namsa/msa.py +12 −3 Original line number Diff line number Diff line Loading @@ -338,9 +338,10 @@ class MSAHybrid(MSA): @staticmethod def clean_up(ctx): ctx.pop() ctx.detach() ctx = None from pycuda.tools import clear_context_caches clear_context_caches() ctx.detach() def plan_simulation(self, num_probes=None): if num_probes is None: Loading Loading @@ -750,6 +751,14 @@ class MSAGPU(MSAHybrid): simplefilter('ignore') catch_warn() self.probes = self.probes.astype(np.float32) # discard imaginary # clean up device variables self.pot_dev_ptr.free() mask_d.free() propag_d.free() psi_k_d.free() grid_range_d.free() grid_steps_d.free() ones_d.free() def __propagate_beams(self, num_probes, batch, psi_pos_d, propag_d, psi_k_d, norm_const_d, grid_steps_d, grid_range_d, Loading