Skip to content

Commit 993eee6

Browse files
Clarify comments in utils.cc
1 parent 5bba3f6 commit 993eee6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

onnxruntime/core/session/utils.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,11 @@ static OrtStatus* CreateSessionAndLoadModelImpl(_In_ const OrtSessionOptions* op
134134
bool load_config_from_model =
135135
os_env.GetEnvironmentVar(inference_session_utils::kOrtLoadConfigFromModelEnvVar) == "1";
136136

137-
// If ep.context_enable is set, then ep.context_file_path is expected, otherwise ORT don't know where to generate the _ctx.onnx file
137+
// Check EPContext model generation options when the input model is loaded from memory (no input model path).
138138
if (options && model_path == nullptr) {
139139
epctx::ModelGenOptions ep_ctx_gen_options = options->value.GetEpContextGenerationOptions();
140140

141+
// Because there is no input model path, we require the application to explicitly set an output model's location.
141142
// This is checked by the OrtCompileApi's CompileModel() function, but we check again here in case
142143
// the user used the older SessionOptions' configuration entries to generate a compiled model.
143144
if (ep_ctx_gen_options.enable) {

0 commit comments

Comments
 (0)