Support CoreML for macOS (#151)

This commit is contained in:
Fangjun Kuang
2023-05-12 15:57:44 +08:00
committed by GitHub
parent de1880948b
commit cea718e3d8
22 changed files with 216 additions and 87 deletions

View File

@@ -22,6 +22,9 @@ void OfflineModelConfig::Register(ParseOptions *po) {
po->Register("debug", &debug,
"true to print model information while loading it.");
po->Register("provider", &provider,
"Specify a provider to use: cpu, cuda, coreml");
}
bool OfflineModelConfig::Validate() const {
@@ -55,7 +58,8 @@ std::string OfflineModelConfig::ToString() const {
os << "nemo_ctc=" << nemo_ctc.ToString() << ", ";
os << "tokens=\"" << tokens << "\", ";
os << "num_threads=" << num_threads << ", ";
os << "debug=" << (debug ? "True" : "False") << ")";
os << "debug=" << (debug ? "True" : "False") << ", ";
os << "provider=\"" << provider << "\")";
return os.str();
}