kernel_tuning_cache.h#
-
namespace onnx_light
Alias that makes onnx-light headers compatible with code that references
ONNX_LIGHT_NAMESPACE(the macro used in the standard onnx package).Set to
ONNX_LIGHT_NAMESPACEso both names resolve to the same namespace.Symbol-visibility attribute for the public onnx-light C++ API.
Maps the upstream compatibility macro to onnx-light’s explicit proto ABI annotation. This keeps declarations from vendored ONNX headers visible when
lib_onnx_protouses hidden visibility by default.Namespace alias so that ONNX C++ code (and consumers such as onnxruntime) that refers to the literal
onnxnamespace — rather than theONNX_NAMESPACEmacro — resolves to the onnx-light namespace. The standard onnx package lives innamespace onnx; onnx-light usesonnx_light(via ONNX_LIGHT_NAMESPACE), so this alias keeps onnx-light a true drop-in. It is only introduced when the onnx-light namespace differs fromonnx.-
namespace core
-
namespace runtime
Enums
Functions
-
std::filesystem::path DefaultKernelTuningCachePath()#
Returns the platform-specific default tuning cache path.
Returns: A path under the user’s cache directory.
-
KernelTuningCacheInspectionReport InspectKernelTuningCache(const KernelTuningCacheOptions &options = {})#
Reads every persisted profile without changing the tuning registry.
Parsed profiles retain their recorded processor and effective thread count. Schema compatibility and value validation are intentionally deferred to :cpp:func:
LoadKernelTuningCache.
-
KernelTuningCacheUpdateReport UpdateKernelTuningCache(std::span<const CalibratedKernelProfile> profiles, const KernelTuningCacheOptions &options = {})#
Validates, merges, and atomically persists calibrated profiles.
The complete key consists of the tuning key and execution descriptor. Existing valid entries not replaced or pruned are preserved.
-
KernelTuningCacheUpdateReport UpdateKernelTuningCache(std::span<const KernelTuningParameters> profiles, const KernelTuningCacheOptions &options = {})#
Updates profiles that all target one execution descriptor.
options.executionselects that descriptor, or the current execution descriptor when it is absent.
-
KernelTuningCacheLoadReport LoadKernelTuningCache(const KernelCalibrationSelection &selection = {}, const KernelTuningCacheOptions &options = {})#
Loads compatible cache entries and publishes one immutable registry generation.
The versioned text format starts with
onnx_light_kernel_tuning_cache 1. Eachprofile/endblock stores one exact key, processor descriptor, effective thread count, and typedvaluerecords. Quoted strings use the C++std::quotedrepresentation.Missing and unreadable files, malformed input, incompatible entries, and invalid parameter sets are reported without replacing portable defaults.
-
KernelTuningDeploymentImportReport ImportKernelTuningDeploymentProfiles(const KernelCalibrationSelection &selection, const KernelTuningDeploymentImportOptions &options)#
Imports cache entries under one explicit deployment processor selector.
All selected profiles validate before one immutable registry generation is published. Cached execution descriptors do not widen the supplied selector.
-
struct CalibratedKernelProfile#
- #include <kernel_tuning_cache.h>
Stores one calibrated parameter set with its complete execution identity.
-
struct KernelTuningCacheInspectionReport#
- #include <kernel_tuning_cache.h>
Reports cache contents without validating or publishing them.
Public Members
-
std::vector<CalibratedKernelProfile> profiles#
-
std::vector<CalibratedKernelProfile> profiles#
-
struct KernelTuningCacheLoadReport#
- #include <kernel_tuning_cache.h>
Reports every cache classification without throwing for file or data errors.
Public Members
-
uint64_t published_generation = 0#
-
std::vector<KernelTuningKey> loaded#
-
std::vector<KernelTuningKey> incompatible#
-
std::vector<KernelTuningKey> stale#
-
std::vector<KernelTuningKey> invalid#
-
std::vector<KernelTuningKey> missing#
-
uint64_t published_generation = 0#
-
struct KernelTuningCacheOptions#
- #include <kernel_tuning_cache.h>
Controls cache location and execution-descriptor matching.
-
struct KernelTuningCacheUpdateReport#
- #include <kernel_tuning_cache.h>
Reports the merge and atomic replacement performed by a cache update.
Public Members
-
std::vector<KernelTuningKey> updated#
-
std::vector<KernelTuningKey> preserved#
-
std::vector<KernelTuningKey> pruned#
-
std::vector<KernelTuningKey> updated#
-
struct KernelTuningDeploymentImportOptions#
- #include <kernel_tuning_cache.h>
Controls import of a cache file as read-only deployment profiles.
-
struct KernelTuningDeploymentImportReport#
- #include <kernel_tuning_cache.h>
Reports transactional deployment-profile registration.
Public Members
-
uint64_t published_generation = 0#
-
std::vector<KernelTuningKey> imported#
-
std::vector<KernelTuningKey> incompatible#
-
std::vector<KernelTuningKey> stale#
-
std::vector<KernelTuningKey> invalid#
-
uint64_t published_generation = 0#
-
std::filesystem::path DefaultKernelTuningCachePath()#
-
namespace runtime
-
namespace core