MCPcopy Create free account
hub / github.com/apple/coremltools / hasIOS18Features

Method hasIOS18Features

mlmodel/src/Utils.cpp:687–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685}
686
687bool CoreML::hasIOS18Features(const Specification::Model& model) {
688 // New in IOS18 features:
689 // - Language expansion for multilingual BERT used in text classifier and word tagger (revision == 5)
690
691 return walkModelAndPipeline(
692 model,
693 [](const Specification::Model& m) {
694 if (hasMultiFunctions(m) ||
695 hasEmptyInput(m)) {
696 return true;
697 }
698
699 switch (m.Type_case()) {
700 case Specification::Model::kWordTagger:
701 if (m.wordtagger().revision() == 5) {
702 return true;
703 }
704 break;
705 case Specification::Model::kTextClassifier:
706 if (m.textclassifier().revision() == 5) {
707 return true;
708 }
709 break;
710 case Specification::Model::kMlProgram:
711 if (hasCoreML8Opsets(m)) {
712 return true;
713 }
714 break;
715 default:
716 break;
717 }
718 return false;
719 });
720}
721
722bool CoreML::hasIOS26Features(const Specification::Model& model) {
723 // New in IOS19 features:

Callers

nothing calls this directly

Calls 4

walkModelAndPipelineFunction · 0.85
hasMultiFunctionsFunction · 0.85
hasEmptyInputFunction · 0.85
hasCoreML8OpsetsFunction · 0.85

Tested by

no test coverage detected