From 41e6732a66856cb9a6f36ca71bec3ebcf1a2835c Mon Sep 17 00:00:00 2001 From: "Michael K. Sanders" Date: Thu, 6 Dec 2018 12:34:07 +0000 Subject: [PATCH] Adds float16 support for RANDOM_MULTINOMIAL. Bug: 118607845 Test: VtsHalNeuralnetworksV1_2TargetTest --hal_service_instance=android.hardware.neuralnetworks@1.2::IDevice/sample-all Change-Id: Iac8c0c23a8219702697a7a126e5e2e43ef0461f4 Merged-In: Iac8c0c23a8219702697a7a126e5e2e43ef0461f4 (cherry picked from commit 5b2615be210f971333459825b42f47ddee233443) --- neuralnetworks/1.2/vts/functional/ValidateModel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp index 6c3b7b8a89..7fccac3554 100644 --- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp +++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp @@ -325,6 +325,7 @@ static bool mutateOperationOperandTypeSkip(size_t operand, OperandType type, con // - ARGMIN and ARGMAX's first argument can be any of // TENSOR_(FLOAT16|FLOAT32|INT32|QUANT8_ASYMM). // - CAST's argument can be any of TENSOR_(FLOAT16|FLOAT32|INT32|QUANT8_ASYMM). + // - RANDOM_MULTINOMIAL's argument can be either TENSOR_FLOAT16 or TENSOR_FLOAT32. switch (operation.type) { case OperationType::LSH_PROJECTION: { if (operand == operation.inputs[1]) { @@ -339,6 +340,11 @@ static bool mutateOperationOperandTypeSkip(size_t operand, OperandType type, con return true; } } break; + case OperationType::RANDOM_MULTINOMIAL: { + if (type == OperandType::TENSOR_FLOAT16 || type == OperandType::TENSOR_FLOAT32) { + return true; + } + } break; default: break; }