Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yuslepukhin committed Dec 17, 2024
1 parent d5ceb84 commit 9837a8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 7 additions & 6 deletions onnxruntime/core/framework/prepacked_weights_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,16 @@ using PrepackedKeyToBlobMap = std::unordered_map<std::string, PrePackedWeights>;

/// <summary>
/// This class has a dual purpose.
/// When saving to disk is ON (IsSaveModeOn() true)
/// it provides a storage container for PrePackedWeights instances.
/// The pre-packed data is collected using PrepackConstaitInitializers instance.
/// In this case newly pre-pack data is used for writing to disk, unless the data loaded from disk matches.
///
/// If saving is OFF, it is used to contain the weights memory mapped from disk.
/// If saving is OFF (IsSaveModeOn() false), it is used to contain the weights memory mapped from disk.
/// Those weights are then moved to the shared container if weight sharing is enabled.
/// If cross-session weight sharing is not enabled, the weights are stored in this container,
/// and shared with the interested kernels.
///
/// When saving to disk is ON (IsSaveModeOn() true)
/// It records the pre-packed weights blobs and associates them with the weight name.
/// When saving the model with external initializers, the weights are written to disk along
/// with the pre-packed blobs.
///
/// </summary>
class PrepackedWeightsForGraph {
public:
Expand Down
2 changes: 0 additions & 2 deletions onnxruntime/test/framework/session_state_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ namespace test {

#ifndef ENABLE_TRAINING_CORE
#ifndef __wasm__
// This specialization is used by SessionStateTestSharedInitalizersWithPrePacking.TestPrepackedSerialization down below
// to be called on the main graph
static void TestSavedPrepacks(const Model& model) {
auto inspect = [](const Graph& graph) {
const auto& prepacked_for_graph = graph.GetPrepacked();
Expand Down

0 comments on commit 9837a8d

Please sign in to comment.