kernel_tuner icon indicating copy to clipboard operation
kernel_tuner copied to clipboard

Refactoring cache files

Open benvanwerkhoven opened this issue 2 years ago • 2 comments

I think it's time to refactor the functionality for cache files. We now run into issues when we try to load a cachefile created half a year ago, because certain timings or other fields are missing. Cache files are also used by multiple tools, such as the dashboard, so it makes sense to properly define them.

In terms of code we could group all related methods into a single object and module, as everything related to cache files is now in util.py.

It would also be good to properly define the format of cachefiles using a JSON schema with a version number and functionality to automatically convert cache files created using earlier versions of Kernel Tuner to newer versions.

benvanwerkhoven avatar Apr 07 '23 08:04 benvanwerkhoven

I recently spent some time thinking about the interface we have for caches. I thought that if we want to have more options to specify things related to the cache file that we could work with a dict in place of the current string passed to the cache= option of tune_kernel. This dict could then have a key 'name' with the filename and any number of other fields to specify other things.

benvanwerkhoven avatar Oct 31 '23 10:10 benvanwerkhoven

Sounds more future proof than just the file name we pass now.

isazi avatar Oct 31 '23 14:10 isazi