@@ -246,8 +246,8 @@ int ParseDAGRunCommand(RedisAI_RunInfo *rinfo, RedisModuleCtx *ctx, RedisModuleS
246246 const char * arg_string = RedisModule_StringPtrLen (argv [arg_pos ], NULL );
247247
248248 if (!strcasecmp (arg_string , "LOAD" ) && !load_complete && chainingOpCount == 0 ) {
249- /* Load the required tensors from key space and store them in both
250- dagTensorsLoadedContext and dagTensorsContext dicts . */
249+ /* Load the required tensors from key space to the dag shared tensors
250+ * array, and save a mapping of their names to the corresponding indices . */
251251 const int parse_result =
252252 _ParseDAGLoadArgs (ctx , & argv [arg_pos ], argc - arg_pos , rinfo -> tensorsNamesToIndices ,
253253 & rinfo -> dagSharedTensors , "|>" , rinfo -> err );
@@ -263,8 +263,9 @@ int ParseDAGRunCommand(RedisAI_RunInfo *rinfo, RedisModuleCtx *ctx, RedisModuleS
263263 "ERR PERSIST cannot be specified in a read-only DAG" );
264264 goto cleanup ;
265265 }
266- /* Store the keys to persist in dagTensorsPersistedContext dict.
267- These keys will be populated later on with actual tensors. */
266+ /* Store the keys to persist in persistTensors dict, these keys will
267+ * be mapped later to the indices in the dagSharedTensors array in which the
268+ * tensors to persist will be found by the end of the DAG run. */
268269 const int parse_result = _ParseDAGPersistArgs (& argv [arg_pos ], argc - arg_pos ,
269270 rinfo -> persistTensors , "|>" , rinfo -> err );
270271 if (parse_result <= 0 )
0 commit comments