Class ov::runtime::SingleFileStorage#

class SingleFileStorage : public ov::ICacheManager, public ov::IContextStore#

Public Functions

virtual void write_cache_entry(const std::string &blob_id, StreamWriter writer) override#

Write a cache entry to the storage.

Parameters:
  • blob_id – The identifier of the blob.

  • writer – The function to write the blob data.

virtual void read_cache_entry(const std::string &blob_id, bool mmap_enabled, StreamReader reader) override#

Read a cache entry from the storage.

Parameters:
  • blob_id – The identifier of the blob.

  • enable_mmap – Whether to use memory mapping for reading the blob data.

  • reader – The function to read the blob data.

virtual void remove_cache_entry(const std::string &blob_id) override#

Remove a cache entry from the storage.

Note

This function does nothing - the storage is append-only.

Parameters:

blob_id – The identifier of the blob to be removed.

void write_context(const weight_sharing::Context &context) override#

Write the weight sharing context to the storage.

Parameters:

context – The weight sharing context to be stored.

virtual std::shared_ptr<wsh::Context> get_context() const override#

Get the weight sharing context from the storage.

Returns:

The weight sharing context stored in the storage.

Public Static Attributes

static constexpr util::Version m_version = {0, 1, 0}#

Current version of the single file storage format.