FranklandJack commented on code in PR #14483:
URL: https://github.com/apache/tvm/pull/14483#discussion_r1171465090
##########
tests/cpp/target/parsers/aprofile_test.cc:
##########
@@ -290,9 +290,28 @@ TEST(AProfileParser, ArchVersionInvalidLetter) {
ASSERT_EQ(Downcast<Bool>(features.at("has_dotprod")), false);
}
+using AProfileOptionalSVE = testing::TestWithParam<float>;
+TEST_P(AProfileOptionalSVE, OptionalSVESupport) {
+ const auto arch_attr = "+v" + std::to_string(GetParam()) + "a";
+
+ // Check that the "has_sve" feature is not set by default when "+sve" isn't
set as an attribute.
+ auto target = ParseTargetWithAttrs("", "aarch64-arm-none-eabi", {arch_attr});
+ auto features = Downcast<TargetFeatures>(target.at("features"));
Review Comment:
In the first and third case it avoids repeating the type name that is
already on the RHS of the assignment operator. The repeated typename is
redundant information to the reader and is just extra noise. Anyone reading
case 1 can see that it is a `std::string` from the call to `std::to_string` and
reading case 2 can see it is a `TargetFeatures` from the call to
`Downcast<TargetFeatures>`. I don't have a strong opinion on this, but I do
think `auto` adds value here and isn't just avoiding writing an explicit type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]