diff --git a/src/target/parsers/mprofile.cc b/src/target/parsers/mprofile.cc index 9bcf2c907832..29c782ba6e08 100644 --- a/src/target/parsers/mprofile.cc +++ b/src/target/parsers/mprofile.cc @@ -36,9 +36,9 @@ const TargetFeatures kHasDSP = {{"has_dsp", Bool(true)}, {"has_mve", Bool(false) const TargetFeatures kHasMVE = {{"has_dsp", Bool(true)}, {"has_mve", Bool(true)}}; static const char* baseCPUs[] = {"cortex-m0", "cortex-m3"}; -static const char* dspCPUs[] = {"cortex-m55", "cortex-m4", "cortex-m7", "cortex-m33", - "cortex-m35p"}; -static const char* mveCPUs[] = {"cortex-m55"}; +static const char* dspCPUs[] = {"cortex-m55", "cortex-m4", "cortex-m7", + "cortex-m33", "cortex-m35p", "cortex-m85"}; +static const char* mveCPUs[] = {"cortex-m55", "cortex-m85"}; template static inline bool MatchesCpu(Optional mcpu, const Container& cpus) { diff --git a/tests/cpp/relay/backend/contrib/cmsisnn/compiler_attrs_test.cc b/tests/cpp/relay/backend/contrib/cmsisnn/compiler_attrs_test.cc index 7db6487f6ea9..24dd3a6f5e2d 100644 --- a/tests/cpp/relay/backend/contrib/cmsisnn/compiler_attrs_test.cc +++ b/tests/cpp/relay/backend/contrib/cmsisnn/compiler_attrs_test.cc @@ -53,18 +53,30 @@ TEST(CMSISNNTarget, CreateFromUndefined) { ASSERT_EQ(target->GetFeature("has_dsp").value_or(Bool(false)), Bool(false)); } -TEST(CMSISNNTarget, CreateFromContext) { +TEST(CMSISNNTarget, CreateFromContextCortexM55) { Target target = GetTargetWithCompilerAttrs("cortex-m55", ""); ASSERT_EQ(target->GetFeature("has_mve").value_or(Bool(false)), Bool(true)); ASSERT_EQ(target->GetFeature("has_dsp").value_or(Bool(false)), Bool(true)); } -TEST(CMSISNNTarget, CreateFromContextWithAttrs) { +TEST(CMSISNNTarget, CreateFromContextWithAttrsCortexM55) { Target target = GetTargetWithCompilerAttrs("cortex-m55", "+nomve"); ASSERT_EQ(target->GetFeature("has_mve").value_or(Bool(false)), Bool(false)); ASSERT_EQ(target->GetFeature("has_dsp").value_or(Bool(false)), Bool(true)); } +TEST(CMSISNNTarget, CreateFromContextCortexM85) { + Target target = GetTargetWithCompilerAttrs("cortex-m85", ""); + ASSERT_EQ(target->GetFeature("has_mve").value_or(Bool(false)), Bool(true)); + ASSERT_EQ(target->GetFeature("has_dsp").value_or(Bool(false)), Bool(true)); +} + +TEST(CMSISNNTarget, CreateFromContextWithAttrsCortexM85) { + Target target = GetTargetWithCompilerAttrs("cortex-m85", "+nomve"); + ASSERT_EQ(target->GetFeature("has_mve").value_or(Bool(false)), Bool(false)); + ASSERT_EQ(target->GetFeature("has_dsp").value_or(Bool(false)), Bool(true)); +} + } // namespace cmsisnn } // namespace contrib } // namespace relay