Skip to content

Commit 921951f

Browse files
authored
fix
1 parent 06573c3 commit 921951f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lightllm/common/triton_utils/autotuner.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def _ensure_cache_loaded(self, static_key: str):
170170
self.cached_configs[static_key] = {}
171171
self._loaded_static_keys.add(static_key)
172172

173-
def _bench(self, *args, n_repeat=5, n_retries=10, current_best_ms=None, **kwargs):
173+
def _bench(self, *args, n_repeat=5, n_retries=1, current_best_ms=None, **kwargs):
174174
from triton.compiler.errors import CompileTimeAssertionFailure
175175
from triton.runtime.errors import OutOfResources, PTXASError
176176

@@ -208,15 +208,6 @@ def kernel_call():
208208
end_event.record()
209209
torch.cuda.synchronize()
210210
state.update(start_event.elapsed_time(end_event) / n_repeat)
211-
212-
# early stop
213-
if current_best_ms is not None and i >= 3:
214-
remaining_retries = n_retries - (i + 1)
215-
estimated_rem_time = remaining_retries * state.min
216-
if state.sum + estimated_rem_time > current_best_ms * n_retries:
217-
self.early_stop_cnt += 1
218-
del g
219-
return state.avg
220211
del g
221212
return state.avg
222213
except (OutOfResources, PTXASError, CompileTimeAssertionFailure, RuntimeError, Exception):

0 commit comments

Comments
 (0)