mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Eliminate c10::guts::to_string (#108480)
This PR replace c10::guts::to_string with std::to_string. The major part of changes is using void* as optimizer state key since string is used only for serialization and using pointers as hashing keys is more efficient than a string. Some other guts functions in the affected source files are also replaced. Pull Request resolved: https://github.com/pytorch/pytorch/pull/108480 Approved by: https://github.com/Skylion007
This commit is contained in:
@ -564,7 +564,7 @@ mobile::Module _load_for_mobile_impl(
|
||||
// Add model_name and model_size to metadata_map
|
||||
extra_files.insert(std::make_pair("model_name", result.name()));
|
||||
extra_files.insert(
|
||||
std::make_pair("model_size", c10::guts::to_string(model_size)));
|
||||
std::make_pair("model_size", std::to_string(model_size)));
|
||||
metadata_map = observer->processMetadataFromExtra(extra_files);
|
||||
observer->onExitLoadModel(instance_key, metadata_map);
|
||||
}
|
||||
|
Reference in New Issue
Block a user