Make the enums signed int, remove unused info.
Bug: 63905942
Test: NeuralNetworksTest pass
Change-Id: I40ca1120d05ea8900f4f4e49409d3096f46ec0e1
diff --git a/neuralnetworks/1.0/types.hal b/neuralnetworks/1.0/types.hal
index 730d1f2..5e3cf54 100644
--- a/neuralnetworks/1.0/types.hal
+++ b/neuralnetworks/1.0/types.hal
@@ -20,7 +20,7 @@
// The types an operand can have.
// These values are the same as found in the NeuralNetworks.h and NeuralNetworksOEM.h files.
-enum OperandType : uint32_t {
+enum OperandType : int32_t {
FLOAT32 = 0,
INT32 = 1,
UINT32 = 2,
@@ -36,7 +36,7 @@
// NeuralNetworks.h and NeuralNetworksOEM.h files, these specify the data type they operate on.
// This is done to simplify the work of drivers.
// TODO: Currently they are the same. Add a conversion when finalizing the model.
-enum OperationType : uint32_t {
+enum OperationType : int32_t {
ADD = 0,
AVERAGE_POOL_2D = 1,
CONCATENATION = 2,
@@ -79,7 +79,7 @@
};
// How an operand is used.
-enum OperandLifeTime : uint32_t {
+enum OperandLifeTime : int32_t {
// The operand is internal to the model. It's created by an operation
// and consumed by other operations.
TEMPORARY_VARIABLE,
@@ -95,7 +95,7 @@
};
// Status of a device.
-enum DeviceStatus : uint32_t {
+enum DeviceStatus : int32_t {
AVAILABLE,
BUSY,
OFFLINE,
@@ -120,11 +120,8 @@
// The capabilities of a driver.
struct Capabilities {
vec<OperationTuple> supportedOperationTuples;
- // TODO Do the same for baseline model IDs
bool cachesCompilation;
// TODO revisit the data types and scales.
- float bootupTime; // in nanoseconds
- PerformanceInfo float16Performance;
PerformanceInfo float32Performance;
PerformanceInfo quantized8Performance;
};
@@ -205,7 +202,7 @@
vec<memory> pools;
};
-enum ErrorStatus : uint32_t {
+enum ErrorStatus : int32_t {
NONE,
DEVICE_UNAVAILABLE,
GENERAL_FAILURE,
diff --git a/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworksV1_0TargetTest.cpp b/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworksV1_0TargetTest.cpp
index 5a20f44..0302717 100644
--- a/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworksV1_0TargetTest.cpp
+++ b/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworksV1_0TargetTest.cpp
@@ -83,9 +83,6 @@
EXPECT_NE(nullptr, capabilities.supportedOperationTuples.data());
EXPECT_NE(0ull, capabilities.supportedOperationTuples.size());
EXPECT_EQ(0u, static_cast<uint32_t>(capabilities.cachesCompilation) & ~0x1);
- EXPECT_LT(0.0f, capabilities.bootupTime);
- EXPECT_LT(0.0f, capabilities.float16Performance.execTime);
- EXPECT_LT(0.0f, capabilities.float16Performance.powerUsage);
EXPECT_LT(0.0f, capabilities.float32Performance.execTime);
EXPECT_LT(0.0f, capabilities.float32Performance.powerUsage);
EXPECT_LT(0.0f, capabilities.quantized8Performance.execTime);