Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds an interface for modifying cache files, which is located in the
kernel_tuner/cache
directory. This directory contains the following modules:cache
(main module): contains aCache
class through which cache files can be created, read and written. This should be the only python module that needs to be used for modifying cache files.cli_tools
: contains functions used in thektcache
command.convert
: contains functions for converting (older) cache files to newer cache files.file
: contains functions for reading JSON from and writing JSON to cache files.json
: contains TypeDict type hints for typing code.json_encoder
: contains a custom instance of JSONEncoder that automatically serializes data into JSON in a readable format.paths
: contains useful paths within the project.versions
: exports useful Semver version constants.Furthermore the following test modules have been added:
test_cachefile_class.py
: tests whether the class integrates the functionalities of the other cache modules in the correct way and the additional logic in theCache
class.test_cachefile_encoder.py
: tests whether the JSON is encoded in the right way.test_cachefile_read_write.py
: tests whether cache is read and written in the correct format.test_cachefile_schema.py
: tests the correctness of the schema.test_script_ktcache.py
: tests thektcache
CLI command.We have not yet added an entry to the
CHANGELOG.md
, because we are not sure in what version these changes will be introduced.