Skip to content

Commit 04c8087

Browse files
committed
address copilot feedback
1 parent 0f9147c commit 04c8087

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

include/onnxruntime/core/graph/graph.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,16 @@ class Graph { // NOLINT(clang-analyzer-optin.performance.Padding): preserve exi
14691469
/// <returns></returns>
14701470
Status ConvertInitializersIntoOrtValues(gsl::span<const std::filesystem::path> whitelisted_external_paths);
14711471

1472+
/// <summary>
1473+
/// This function converts all the graph TensorProto initializers into OrtValues
1474+
/// and creates a in-memory external data reference for each OrtValue.
1475+
/// External data paths are restricted to the model directory.
1476+
/// </summary>
1477+
/// <returns></returns>
1478+
Status ConvertInitializersIntoOrtValues() {
1479+
return ConvertInitializersIntoOrtValues(gsl::span<const std::filesystem::path>());
1480+
}
1481+
14721482
/**
14731483
* @brief This function examines the specified initializers in the graph and converts them inline
14741484
* if any has external data in memory.

include/onnxruntime/core/session/onnxruntime_c_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7229,7 +7229,7 @@ struct OrtApi {
72297229
*
72307230
* \param[in] options Session options instance.
72317231
* \param[in] whitelisted_data_folders Semicolon-separated list of absolute directory paths, or
7232-
* nullptr/empty string to clear the whitelist.
7232+
* an empty string to clear the whitelist. This pointer must not be NULL.
72337233
*
72347234
* \return nullptr on success, or an OrtStatus on failure.
72357235
*

0 commit comments

Comments
 (0)