From 351ca59582d39547278f3b00eaf9727b0bb3444c Mon Sep 17 00:00:00 2001 From: Slava Shklyaev Date: Fri, 13 Dec 2019 12:21:44 +0000 Subject: [PATCH] Remove neuralnetworks@1.3::Model.Extension* in favor of 1.2 counterparts The types are the same as in 1.2. No changes are expected. Bug: 136735929 Test: m Change-Id: I7431d2e9263fafa0e63b8b1b40f6715e3832d17c Merged-In: I7431d2e9263fafa0e63b8b1b40f6715e3832d17c (cherry picked from commit 8a179f34995909213055af7817d305f7c5cc6577) --- current.txt | 2 +- neuralnetworks/1.3/types.hal | 42 ++++++------------------------------ neuralnetworks/1.3/types.t | 42 ++++++------------------------------ 3 files changed, 13 insertions(+), 73 deletions(-) diff --git a/current.txt b/current.txt index 523f408c64..4463075929 100644 --- a/current.txt +++ b/current.txt @@ -626,7 +626,7 @@ ac429fca0da4ce91218768ec31b64ded88251f8a26d8c4f27c06abdc5b1926d9 android.hardwar 234cc547d63d2f24a447aee0a9a76cab68b31c080adadc5a960598b827a69fa2 android.hardware.neuralnetworks@1.3::IDevice 058b48f0e2e725bb2b3fa2b7917b0f0a696383d03a4c57afe26f0eadb6a7af28 android.hardware.neuralnetworks@1.3::IPreparedModel 94e803236398bed1febb11cc21051bc42ec003700139b099d6c479e02a7ca3c3 android.hardware.neuralnetworks@1.3::IPreparedModelCallback -2576ba54711218ce0d7f207baa533fca9af3c630756938ede6e73fe197b7ea38 android.hardware.neuralnetworks@1.3::types +1435cf1724f9f89ff5f97d4aa6fe2a031b0ef43034cb5801b16229dc2ecfea82 android.hardware.neuralnetworks@1.3::types 3e01d4446cd69fd1c48f8572efd97487bc179564b32bd795800b97bbe10be37b android.hardware.wifi@1.4::IWifi a64467bae843569f0d465c5be7f0c7a5b987985b55a3ef4794dd5afc68538650 android.hardware.wifi.supplicant@1.3::ISupplicant 44445b8a03d7b9e68b2fbd954672c18a8fce9e32851b0692f4f4ab3407f86ecb android.hardware.wifi.supplicant@1.3::ISupplicantStaIface diff --git a/neuralnetworks/1.3/types.hal b/neuralnetworks/1.3/types.hal index 6c8fe43312..bb924c26ba 100644 --- a/neuralnetworks/1.3/types.hal +++ b/neuralnetworks/1.3/types.hal @@ -20,6 +20,8 @@ import @1.0::DataLocation; import @1.0::OperandLifeTime; import @1.0::PerformanceInfo; import @1.0::RequestArgument; +import @1.2::Model.ExtensionNameAndPrefix; +import @1.2::Model.ExtensionTypeEncoding; import @1.2::OperandType; import @1.2::OperationType; import @1.2::SymmPerChannelQuantParams; @@ -5157,9 +5159,9 @@ struct Model { * {@link OperandTypeRange::BASE_MAX} or * {@link OperationTypeRange::BASE_MAX} respectively should be interpreted * as an extension operand. The low - * {@link Model::ExtensionTypeEncoding::LOW_BITS_TYPE} bits of the value - * correspond to the type ID within the extension and the high - * {@link Model::ExtensionTypeEncoding::HIGH_BITS_PREFIX} bits encode + * {@link @1.2::Model::ExtensionTypeEncoding::LOW_BITS_TYPE} bits of the + * value correspond to the type ID within the extension and the high + * {@link @1.2::Model::ExtensionTypeEncoding::HIGH_BITS_PREFIX} bits encode * the "prefix", which maps uniquely to the extension name. * * For example, if a model contains an operation whose value is @@ -5172,39 +5174,7 @@ struct Model { * prefix corresponding to each extension name and at most one extension * name corresponding to each prefix. */ - vec extensionNameToPrefix; - - /** - * A correspondence between an extension name and a prefix of operand and - * operation type values. - */ - struct ExtensionNameAndPrefix { - /** - * The extension name. - * - * See {@link Extension::name} for the format specification. - */ - string name; - - /** - * The unique extension identifier within the model. - * - * See {@link Model::extensionNameToPrefix}. - */ - uint16_t prefix; - }; - - /** - * Numeric values of extension operand and operation types have the - * following structure: - * - 16 high bits represent the "prefix", which corresponds uniquely to the - * extension name. - * - 16 low bits represent the type ID within the extension. - */ - enum ExtensionTypeEncoding : uint8_t { - HIGH_BITS_PREFIX = 16, - LOW_BITS_TYPE = 16, - }; + vec<@1.2::Model.ExtensionNameAndPrefix> extensionNameToPrefix; }; /** diff --git a/neuralnetworks/1.3/types.t b/neuralnetworks/1.3/types.t index b1c72a9a31..b4c37697a1 100644 --- a/neuralnetworks/1.3/types.t +++ b/neuralnetworks/1.3/types.t @@ -22,6 +22,8 @@ import @1.0::DataLocation; import @1.0::OperandLifeTime; import @1.0::PerformanceInfo; import @1.0::RequestArgument; +import @1.2::Model.ExtensionNameAndPrefix; +import @1.2::Model.ExtensionTypeEncoding; import @1.2::OperandType; import @1.2::OperationType; import @1.2::SymmPerChannelQuantParams; @@ -341,9 +343,9 @@ struct Model { * {@link OperandTypeRange::BASE_MAX} or * {@link OperationTypeRange::BASE_MAX} respectively should be interpreted * as an extension operand. The low - * {@link Model::ExtensionTypeEncoding::LOW_BITS_TYPE} bits of the value - * correspond to the type ID within the extension and the high - * {@link Model::ExtensionTypeEncoding::HIGH_BITS_PREFIX} bits encode + * {@link @1.2::Model::ExtensionTypeEncoding::LOW_BITS_TYPE} bits of the + * value correspond to the type ID within the extension and the high + * {@link @1.2::Model::ExtensionTypeEncoding::HIGH_BITS_PREFIX} bits encode * the "prefix", which maps uniquely to the extension name. * * For example, if a model contains an operation whose value is @@ -356,39 +358,7 @@ struct Model { * prefix corresponding to each extension name and at most one extension * name corresponding to each prefix. */ - vec extensionNameToPrefix; - - /** - * A correspondence between an extension name and a prefix of operand and - * operation type values. - */ - struct ExtensionNameAndPrefix { - /** - * The extension name. - * - * See {@link Extension::name} for the format specification. - */ - string name; - - /** - * The unique extension identifier within the model. - * - * See {@link Model::extensionNameToPrefix}. - */ - uint16_t prefix; - }; - - /** - * Numeric values of extension operand and operation types have the - * following structure: - * - 16 high bits represent the "prefix", which corresponds uniquely to the - * extension name. - * - 16 low bits represent the type ID within the extension. - */ - enum ExtensionTypeEncoding : uint8_t { - HIGH_BITS_PREFIX = 16, - LOW_BITS_TYPE = 16, - }; + vec<@1.2::Model.ExtensionNameAndPrefix> extensionNameToPrefix; }; /**