(self, static_key)
| 184 | return self.fn(*args, **kwargs) |
| 185 | |
| 186 | def _try_load_cache(self, static_key): |
| 187 | if static_key in self.cached_configs: |
| 188 | return |
| 189 | |
| 190 | cache_file = os.path.join(self.cache_dir, KernelConfigs.get_config_file_name(static_key)) |
| 191 | if os.path.exists(cache_file): |
| 192 | logger.info(f"Loading cached configs for {self.kernel_name} - {static_key}") |
| 193 | with open(cache_file, "rb") as f: |
| 194 | self.cached_configs[static_key] = orjson.loads(f.read()) |
| 195 | return |
| 196 | |
| 197 | def _bench(self, *args, n_repeat=3, n_retries=3, **kwargs): |
| 198 | from triton.compiler.errors import CompileTimeAssertionFailure |
no test coverage detected