From e20cb54c197dd86ac5bc23baef2a8971f10aebdd Mon Sep 17 00:00:00 2001 From: Ben van Werkhoven <2337546+benvanwerkhoven@users.noreply.github.com> Date: Wed, 9 Jul 2025 18:07:38 +0200 Subject: [PATCH] add default optimization direction for 'fitness' and 'cost' As we extend to more optimization objectives and explore constrained optimization it happens more often that we have a user-defined metric that defines the optimization objective. This pull makes it easy to specify the optimization direction, without the need to explicitly specify the direction using the ``objective_higher_is_better=`` option of ``tune_kernel()``. Now, if your objective is named ``"fitness"`` Kernel Tuner assumes maximization and for objectives named ``"cost"`` or ``"loss"`` minimization is assumed. --- kernel_tuner/integration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel_tuner/integration.py b/kernel_tuner/integration.py index d3219ba87..adea812ed 100644 --- a/kernel_tuner/integration.py +++ b/kernel_tuner/integration.py @@ -11,6 +11,9 @@ objective_default_map = { "time": False, "energy": False, + "fitness": True, + "cost": False, + "loss": False, "GFLOP/s": True, "TFLOP/s": True, "GB/s": True,