Test dynamic output shape in GeneratedTests.

Enable VTS unit test for dynamic output shape deduction.

Only test dynamic output shape for V1_2::IDevice with V1_2::Model.

Bug: 73506513
Test: VtsHalNeuralnetworksV1_xTargetTest with 1.2 sample driver
Change-Id: I4134e1ec54a15554eb8533134897279651b57da3
Merged-In: I4134e1ec54a15554eb8533134897279651b57da3
(cherry picked from commit a316581b217dcc35d8cafd902f650deb25b3d270)
diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
index 65c5372..bee2556 100644
--- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
@@ -172,6 +172,9 @@
 static void mutateOperandRankTest(const sp<IDevice>& device, const Model& model) {
     for (size_t operand = 0; operand < model.operands.size(); ++operand) {
         const uint32_t invalidRank = getInvalidRank(model.operands[operand].type);
+        if (invalidRank == 0) {
+            continue;
+        }
         const std::string message = "mutateOperandRankTest: operand " + std::to_string(operand) +
                                     " has rank of " + std::to_string(invalidRank);
         validate(device, message, model, [operand, invalidRank](Model* model) {