diff --git a/csrc/quantization/machete/generate.py b/csrc/quantization/machete/generate.py index 8ed81ea727aa3..c35dfe94c9c41 100644 --- a/csrc/quantization/machete/generate.py +++ b/csrc/quantization/machete/generate.py @@ -457,7 +457,13 @@ def generate(): )), ] - schedules = list(set([x[1] for x in default_heuristic])) + # Do not use schedules = list(set(...)) because we need to make sure + # the output list is deterministic; otherwise the generated kernel file + # will be non-deterministic and causes ccache miss. + schedules = [] + for _, schedule_config in default_heuristic: + if schedule_config not in schedules: + schedules.append(schedule_config) impl_configs = []