insertmike opened a new pull request, #18450:
URL: https://github.com/apache/tvm/pull/18450

   ## Problem
   
   When loading model shards from cache (not network), the progress indicator 
   always showed 0% because `fetchedBytes` was not incremented during the cache 
   loading phase in `fetchTensorCacheInternal()`. 
   
   The `reportCallback` function calculates progress as `fetchedBytes * 100 / 
totalBytes`, 
   but `fetchedBytes` was only updated during the network download phase (line 
1361), 
   not during the cache loading phase (lines 1377-1427). This caused the 
progress 
   to remain at 0% until completion when loading from cache.
   
   ## Solution
   
   This fix increments `fetchedBytes` and updates `timeElapsed` after 
processing 
   each cached shard (matching the behavior of the network download phase). The 
   progress callback now correctly reports:
   - Percentage completed (`fetchedBytes * 100 / totalBytes`)
   - MB loaded
   - Time elapsed
   
   ## Changes
   
   - Added `fetchedBytes += shard.nbytes;` after processing each cache shard
   - Added `timeElapsed` update to ensure accurate time reporting
   - Matches the pattern used in the download phase (lines 1360-1361)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to