mirror of
https://github.com/zebrajr/pytorch.git
synced 2026-01-15 12:15:51 +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:
committed by
PyTorch MergeBot
parent
ad4971c0b1
commit
3acaf8564d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user