Skip to content

Commit abaf90d

Browse files
committed
Set up hyperparamtuning cache, made cache names hyperparam-unique
1 parent 11a86eb commit abaf90d

File tree

11 files changed

+6
-4
lines changed

11 files changed

+6
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
poetry.lock
33
noxenv.txt
44
noxsettings.toml
5+
hyperparamtuning/
56

67
### Python ###
78
*.pyc

kernel_tuner/backends/hypertuner.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def ready_argument_list(self, arguments):
5757

5858
def compile(self, kernel_instance):
5959
super().compile(kernel_instance)
60-
path = Path(__file__).parent
60+
path = Path(__file__).parent.parent.parent / "hyperparamtuning"
61+
path.mkdir(exist_ok=True)
6162

6263
# TODO get applications & GPUs args from benchmark
6364
gpus = ["RTX_3090", "RTX_2080_Ti"]
@@ -78,9 +79,10 @@ def compile(self, kernel_instance):
7879
# strategy settings
7980
strategy: str = kernel_instance.arguments[0]
8081
hyperparams = [{'name': k, 'value': v} for k, v in kernel_instance.params.items()]
82+
hyperparams_string = "_".join(f"{k}={str(v)}" for k, v in kernel_instance.params.items())
8183
searchspace_strategies = [{
8284
"autotuner": "KernelTuner",
83-
"name": strategy.lower(),
85+
"name": f"{strategy.lower()}_{hyperparams_string}",
8486
"display_name": strategy.replace('_', ' ').capitalize(),
8587
"search_method": strategy.lower(),
8688
'search_method_hyperparameters': hyperparams
@@ -94,7 +96,6 @@ def compile(self, kernel_instance):
9496
}
9597

9698
name = kernel_instance.name if len(kernel_instance.name) > 0 else kernel_instance.kernel_source.kernel_name
97-
9899
experiments_filepath = generate_experiment_file(name, path, searchspace_strategies, applications, gpus,
99100
override=override, overwrite_existing_file=True)
100101
return str(experiments_filepath)
Binary file not shown.
Binary file not shown.
Binary file not shown.
-3.05 MB
Binary file not shown.
-2.13 MB
Binary file not shown.
-2.46 MB
Binary file not shown.
-2.23 MB
Binary file not shown.
-2.61 MB
Binary file not shown.

0 commit comments

Comments
 (0)