[2/N] Replace c10::sv with std::sv (#139456)

Follows  #139453

Pull Request resolved: https://github.com/pytorch/pytorch/pull/139456
Approved by: https://github.com/ezyang
This commit is contained in:
cyy
2024-11-06 01:50:38 +00:00
committed by PyTorch MergeBot
parent 39ede99a33
commit 028c5d3426
13 changed files with 43 additions and 26 deletions

View File

@ -43,7 +43,7 @@ class SourceRangeSerializer {
int64_t store_text_and_get_index(const std::string& text_view);
std::vector<c10::IValue> texts_;
std::unordered_map<c10::string_view, int64_t> text_to_idx_;
std::unordered_map<std::string_view, int64_t> text_to_idx_;
};
SourceRange SourceRangeDeserializer::deserialize(const c10::IValue& iv) {
@ -76,7 +76,7 @@ std::shared_ptr<Source> SourceRangeDeserializer::deserialize_source(
"Text table index is out of range")
filename = *text_table_[fnameIndex];
std::vector<c10::string_view> pieces;
std::vector<std::string_view> pieces;
std::vector<std::shared_ptr<std::string>> strs;
for (int64_t i : textIndex) {