mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
[easy] use number of param bytes as the chunk size if it's not provided (#111844)
Summary: ATT Test Plan: CI Differential Revision: D50572228 Pull Request resolved: https://github.com/pytorch/pytorch/pull/111844 Approved by: https://github.com/zyan0, https://github.com/houseroad
This commit is contained in:
parent
ad4971c0b1
commit
3acaf8564d
1 changed files with 3 additions and 0 deletions
|
|
@ -380,6 +380,9 @@ size_t PyTorchStreamReader::getRecord(
|
|||
if ((!load_debug_symbol_) && c10::string_view(name).ends_with(kDebugPklSuffix)) {
|
||||
return 0;
|
||||
}
|
||||
if (chunk_size <= 0) {
|
||||
chunk_size = n;
|
||||
}
|
||||
size_t key = getRecordID(name);
|
||||
mz_zip_archive_file_stat stat;
|
||||
mz_zip_reader_file_stat(ar_.get(), key, &stat);
|
||||
|
|
|
|||
Loading…
Reference in a new issue