MCPcopy Create free account
hub / github.com/RL-Align/RL-Kernel / __init__

Method __init__

benchmarks/profiler.py:164–171  ·  view source on GitHub ↗
(self, device: torch.device | None = None, warmup: int = 3, repeat: int = 10)

Source from the content-addressed store, hash-verified

162 """
163
164 def __init__(self, device: torch.device | None = None, warmup: int = 3, repeat: int = 10):
165 self.device = device if device is not None else device_ctx.device
166 self.warmup = warmup
167 self.repeat = repeat
168 self.gpu_info = GPUProfiler.get_target_info(
169 device_index=self.device.index if self.device.type == "cuda" else -1
170 )
171 self._metrics: list[BenchmarkMetrics] = []
172
173 def _sync(self) -> None:
174 if self.device.type == "cuda":

Callers

nothing calls this directly

Calls 1

get_target_infoMethod · 0.80

Tested by

no test coverage detected