Lines Matching refs:mModel
54 ASSERT_EQ(ANeuralNetworksModel_create(&mModel), ANEURALNETWORKS_NO_ERROR); in SetUp()
57 ANeuralNetworksModel_free(mModel); in TearDown()
64 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in addScalarOperand()
69 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_NO_ERROR); in addOperand()
89 return ANeuralNetworksModel_addOperation(mModel, type, inputs.size(), inputs.data(), in addOperation()
94 return ANeuralNetworksModel_identifyInputsAndOutputs(mModel, inputs.size(), inputs.data(), in identifyInputsAndOutputs()
97 int modelFinish() { return ANeuralNetworksModel_finish(mModel); } in modelFinish()
113 ANeuralNetworksModel* mModel = nullptr; member in __anon1fd66c800111::ValidationTestModel
158 EXPECT_EQ(ANeuralNetworksModel_getExtensionOperandType(mModel, kTestExtensionName, in getExtensionOperandType()
176 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in SetUp()
177 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in SetUp()
178 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &scalarType), ANEURALNETWORKS_NO_ERROR); in SetUp()
179 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in SetUp()
190 ASSERT_EQ(ANeuralNetworksCompilation_create(mModel, &mCompilation), in SetUp()
266 ASSERT_EQ(ANeuralNetworksModel_create(&mModel), ANEURALNETWORKS_NO_ERROR); in SetUp()
267 createModel(mModel, /*dimensionsUnspecified=*/false, /*isValid=*/true); in SetUp()
268 ASSERT_EQ(ANeuralNetworksCompilation_create(mModel, &mCompilation), in SetUp()
297 ANeuralNetworksModel_free(mModel); in TearDown()
376 ANeuralNetworksModel* mModel = nullptr; member in __anon1fd66c800111::ValidationTestExecutionDeviceMemory
399 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
409 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &quant8TypeInvalidScale), in TEST_F()
420 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &quant8TypeInvalidZeroPoint), in TEST_F()
430 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &invalidScalarType), in TEST_F()
433 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &kInvalidTensorType1), in TEST_F()
435 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &kInvalidTensorType2), in TEST_F()
440 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_BAD_STATE); in TEST_F()
457 ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(mModel, operandIndex, nullptr), in TEST_F()
459 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(mModel, operandIndex + 1, in TEST_F()
462 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(mModel, operandIndex, in TEST_F()
470 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &type), ANEURALNETWORKS_BAD_DATA); in TEST_F()
484 EXPECT_EQ(ANeuralNetworksModel_setOperandSymmPerChannelQuantParams(mModel, operandIndex, in TEST_F()
498 ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, nullptr, dataLength), in TEST_F()
500 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, &data, 0), in TEST_F()
502 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex + 1, &data, in TEST_F()
505 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, &data, dataLength), in TEST_F()
512 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, nullptr, 0), in TEST_F()
520 EXPECT_EQ(ANeuralNetworksModel_setOperandExtensionData(mModel, operandIndex, &data, dataLength), in TEST_F()
533 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, operandIndex, buffer, sizeof(buffer)), in TEST_F()
545 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, operandIndex, buffer, sizeof(buffer)), in TEST_F()
557 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_BAD_DATA); in TEST_F()
564 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
566 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, nullptr, 0), in TEST_F()
573 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
578 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, nullptr, sizeof(buffer)), in TEST_F()
582 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, buffer, sizeof(buffer)), in TEST_F()
586 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, buffer, sizeof(float)), in TEST_F()
590 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 1, buffer, sizeof(float)), in TEST_F()
595 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, buffer, sizeof(float)), in TEST_F()
603 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
616 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, nullptr, 0, sizeof(float)), in TEST_F()
620 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, -1, memory, 0, sizeof(float)), in TEST_F()
624 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, 0, memorySize), in TEST_F()
628 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 1, memory, 0, sizeof(float)), in TEST_F()
632 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, memorySize + 1, in TEST_F()
637 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, memorySize - 3, in TEST_F()
643 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, 0, sizeof(float)), in TEST_F()
658 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &quant8Type), ANEURALNETWORKS_NO_ERROR); in TEST_F()
676 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, 0, sizeof(uint8_t)), in TEST_F()
688 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &floatType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
707 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, memorySize + 1, in TEST_F()
712 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromMemory(mModel, 0, memory, memorySize - 3, in TEST_F()
745 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &modelType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
748 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, 0, valueModel), in TEST_F()
754 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, 0, nullptr), in TEST_F()
758 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, -1, valueModel), in TEST_F()
762 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, 1, valueModel), in TEST_F()
767 EXPECT_EQ(ANeuralNetworksModel_setOperandValueFromModel(mModel, 0, valueModel), in TEST_F()
776 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMScalarType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
778 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 0, buffer, sizeof(buffer)), in TEST_F()
785 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMTensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
786 EXPECT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 1, buffer, kByteSizeOfOEMTensor), in TEST_F()
791 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMTensorType), ANEURALNETWORKS_BAD_STATE); in TEST_F()
800 EXPECT_EQ(ANeuralNetworksModel_addOperation(mModel, ANEURALNETWORKS_AVERAGE_POOL_2D, 0, nullptr, in TEST_F()
803 EXPECT_EQ(ANeuralNetworksModel_addOperation(mModel, ANEURALNETWORKS_AVERAGE_POOL_2D, 1, &input, in TEST_F()
821 EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(mModel, 0, nullptr, 1, &output), in TEST_F()
823 EXPECT_EQ(ANeuralNetworksModel_identifyInputsAndOutputs(mModel, 1, &input, 0, nullptr), in TEST_F()
837 EXPECT_EQ(ANeuralNetworksModel_relaxComputationFloat32toFloat16(mModel, true), in TEST_F()
839 EXPECT_EQ(ANeuralNetworksModel_relaxComputationFloat32toFloat16(mModel, false), in TEST_F()
858 EXPECT_EQ(ANeuralNetworksCompilation_create(mModel, nullptr), ANEURALNETWORKS_UNEXPECTED_NULL); in TEST_F()
859 EXPECT_EQ(ANeuralNetworksCompilation_create(mModel, &compilation), ANEURALNETWORKS_BAD_STATE); in TEST_F()
873 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, &device, 1, nullptr), in TEST_F()
877 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, &device, 0, &compilation), in TEST_F()
882 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, invalidDevices, 2, in TEST_F()
887 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, invalidDevices, 2, in TEST_F()
895 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, nullptr, 1, nullptr), in TEST_F()
897 EXPECT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, nullptr, 1, &compilation), in TEST_F()
915 ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, &device, 1, nullptr), in TEST_F()
919 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, &device, 0, in TEST_F()
925 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, invalidDevices, 2, in TEST_F()
930 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, invalidDevices, 2, in TEST_F()
938 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, nullptr, 1, nullptr), in TEST_F()
941 ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, nullptr, 1, supportedOps), in TEST_F()
977 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
978 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
979 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &scalarType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
980 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
981 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
982 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1000 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1001 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1002 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1021 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1022 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1023 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1024 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1041 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1042 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1043 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1061 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1062 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &scalarType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1063 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &tensorType), ANEURALNETWORKS_NO_ERROR); in TEST_F()
1965 ASSERT_EQ(ANeuralNetworksModel_addOperand(mModel, &operandType), ANEURALNETWORKS_BAD_DATA); in TEST_F()
1976 ASSERT_EQ(ANeuralNetworksModel_setOperandValue(mModel, 3, &activation, sizeof(activation)), in createModel()
2027 ASSERT_EQ(ANeuralNetworksCompilation_create(mModel, &compilation), ANEURALNETWORKS_NO_ERROR); in TEST_F()
2040 ASSERT_EQ(ANeuralNetworksCompilation_create(mModel, &secondCompilation), in TEST_F()
2332 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, &mDevice, 1, in SetUp()
2336 ASSERT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, &mDevice, 1, in SetUp()
2451 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, mDevices, 2, in SetUp()
2455 ASSERT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, mDevices, 2, in SetUp()
2532 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMTensorType), in SetUp()
2534 EXPECT_EQ(ANeuralNetworksModel_addOperand(mModel, &OEMTensorType), in SetUp()
2547 EXPECT_EQ(ANeuralNetworksModel_getSupportedOperationsForDevices(mModel, &device, 1, in SetUp()
2551 ASSERT_EQ(ANeuralNetworksCompilation_createForDevices(mModel, &device, 1, in SetUp()