diff options
author | Slava Shklyaev <slavash@google.com> | 2020-08-13 13:16:03 +0100 |
---|---|---|
committer | Slava Shklyaev <slavash@google.com> | 2020-11-02 10:07:07 +0000 |
commit | cbcaa00003cf5a4597460dbb5f8cb9f992e939e7 (patch) | |
tree | fcfc08ec92b731594fc96c586e1207bccce2624d /nn/runtime/test/fuzzing/RandomGraphGenerator.cpp | |
parent | e4a030ef549d8d2c279436628c961eb3f70df7d6 (diff) | |
download | ml-cbcaa00003cf5a4597460dbb5f8cb9f992e939e7.tar.gz |
Migrate NNAPI runtime to canonical types
This change replaces most uses of HAL types in the codebase with
equivalent canonical types. Later changes will introduce more
refactorings.
Also removes unused files nn/runtime/test/Bridge.{h,cpp}.
Bug: 160669906
Fix: 155923931
Test: NeuralNetworksTest_static (all 7 passes)
Test: NeuralNetworksTest_operations
Test: NeuralNetworksTest_utils
Test: NeuralNetworksTest_logtag
Test: nnCache_test
Test: BlobCache_test
Change-Id: I63fa286e926a096948f1b1b172d1d562c4f52f29
Merged-In: I63fa286e926a096948f1b1b172d1d562c4f52f29
(cherry picked from commit 069993366ce59913ff162ed144749bb8794d990c)
Diffstat (limited to 'nn/runtime/test/fuzzing/RandomGraphGenerator.cpp')
-rw-r--r-- | nn/runtime/test/fuzzing/RandomGraphGenerator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nn/runtime/test/fuzzing/RandomGraphGenerator.cpp b/nn/runtime/test/fuzzing/RandomGraphGenerator.cpp index 9799ca00c..8ba763aad 100644 --- a/nn/runtime/test/fuzzing/RandomGraphGenerator.cpp +++ b/nn/runtime/test/fuzzing/RandomGraphGenerator.cpp @@ -44,7 +44,7 @@ using namespace test_helper; RandomOperand::RandomOperand(const OperandSignature& operand, TestOperandType dataType, uint32_t rank) : type(operand.type), finalizer(operand.finalizer) { - NN_FUZZER_LOG << "Operand: " << toString(type); + NN_FUZZER_LOG << "Operand: " << type; if (operand.constructor) operand.constructor(dataType, rank, this); } @@ -81,7 +81,7 @@ size_t RandomOperand::getBufferSize() const { // Construct a RandomOperation from OperationSignature. RandomOperation::RandomOperation(const OperationSignature& operation) : opType(operation.opType), finalizer(operation.finalizer) { - NN_FUZZER_LOG << "Operation: " << toString(opType); + NN_FUZZER_LOG << "Operation: " << opType; // Determine the data type and rank of the operation and invoke the constructor. TestOperandType dataType = getRandomChoice(operation.supportedDataTypes); @@ -294,14 +294,14 @@ TestModel RandomGraph::createTestModel() { // Set model operations. for (auto& operation : mOperations) { - NN_FUZZER_LOG << "Operation: " << toString(operation.opType); + NN_FUZZER_LOG << "Operation: " << operation.opType; TestOperation testOperation = {.type = static_cast<TestOperationType>(operation.opType)}; for (auto& op : operation.inputs) { - NN_FUZZER_LOG << toString(*op); + NN_FUZZER_LOG << *op; testOperation.inputs.push_back(op->opIndex); } for (auto& op : operation.outputs) { - NN_FUZZER_LOG << toString(*op); + NN_FUZZER_LOG << *op; testOperation.outputs.push_back(op->opIndex); } testModel.main.operations.push_back(std::move(testOperation)); |