Rtx Runtime Cache#

class RtxRuntimeCache#

Manages one TRT-RTX runtime cache shared by a deployment’s engines.

Builds a separate IRuntimeConfig for each execution context and attaches the same IRuntimeCache to every config. The cache is serialized back on destruction, so an RtxRuntimeCache must outlive every execution context created from its configs.

Public Functions

~RtxRuntimeCache()#

Serializes the cache to disk if one is loaded.

RtxRuntimeCache(RtxRuntimeCache const&) = delete#
RtxRuntimeCache &operator=(RtxRuntimeCache const&) = delete#
std::unique_ptr<nvinfer1::IRuntimeConfig> createConfig(
nvinfer1::ICudaEngine &engine
)#

Build an engine-specific runtime config backed by the shared runtime cache.

Public Static Functions

static std::shared_ptr<RtxRuntimeCache> create(
std::filesystem::path const &enginePath,
std::optional<std::filesystem::path> const &cachePath
)#

Create a deployment-scoped cache manager.

Parameters:
  • enginePath – on-disk engine path used to derive the default cache path.

  • cachePath – exact cache-file path. Overrides EDGELLM_RTX_RUNTIME_CACHE; when neither is specified, defaults to <engine-directory>/runtime.rtxcache.

static std::filesystem::path resolveCachePath(
std::filesystem::path const &enginePath,
std::optional<std::filesystem::path> const &cachePath
)#

Resolve an explicit cache-file path or derive one from the engine directory.