Change native functions to take c10::string_view args instead of std::string (#57680)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/53546

Pull Request resolved: https://github.com/pytorch/pytorch/pull/57680

Reviewed By: malfet

Differential Revision: D28511799

Pulled By: ezyang

fbshipit-source-id: 43142f994d048b28b3279ccdb7a28cbaa3190973
This commit is contained in:
Kurt Mohler
2021-05-20 18:14:19 -07:00
committed by Facebook GitHub Bot
parent d1d24304ee
commit fe8e5eb260
45 changed files with 295 additions and 183 deletions

View File

@ -39,6 +39,7 @@ static std::unordered_map<std::string, ParameterType> type_map = {
{"Device", ParameterType::DEVICE},
{"Stream", ParameterType::STREAM},
{"std::string", ParameterType::STRING},
{"c10::string_view", ParameterType::STRING},
{"Dimname", ParameterType::DIMNAME},
{"DimnameList", ParameterType::DIMNAME_LIST},
{"ScalarList", ParameterType::SCALAR_LIST},