MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / destroy

Method destroy

deepspeed/inference/engine.py:191–196  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

189 self._is_compiled = False
190
191 def destroy(self):
192 DeepSpeedTransformerInference.layer_id = 0
193 DeepSpeedSelfAttention.num_layers = 0
194 if DeepSpeedTransformerInference.workspace.is_allocated():
195 DeepSpeedTransformerInference.workspace.release_workspace()
196 DeepSpeedTransformerInference.workspace = None
197
198 def profile_model_time(self, use_cuda_events=True):
199 if not self.model_profile_enabled and not self._config.enable_cuda_graph:

Callers 1

__init__Method · 0.95

Calls 2

is_allocatedMethod · 0.80
release_workspaceMethod · 0.45

Tested by

no test coverage detected