Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a4172cd authored by Michael Butler's avatar Michael Butler
Browse files

NN 1.3 HAL: ANAPIC review follow up

This CL makes the following three interface changes:
* Removes @1.3::Operand.ExtraParams, because it was the same as
  @1.2::Operand.ExtraParams
* Changes int32_t token to uint32_t for IDevice::allocate and for
  @1.3::Request.MemoryPool
* Renames OptionalTimePoint::nanoseconds to
  OptionalTimePoint::nanosecondsSinceEpoch

This CL also makes test changes in response to the interface changes,
and fixes a minor comment issue in @1.2::types.hal and @1.3::types.hal.

Bug: 148617339
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I95b49ab34b0b79f587dda035ede700b73dc44a38
parent e8d82de3
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -596,7 +596,7 @@ eb2fa0c883c2185d514be0b84c179b283753ef0c1b77b45b4f359bd23bba8b75 android.hardwar
5f6d3097ba84cb63c430787123f4de1b31c11f90b531b98eae9a8623a5ae962a android.hardware.neuralnetworks@1.1::types
5f6d3097ba84cb63c430787123f4de1b31c11f90b531b98eae9a8623a5ae962a android.hardware.neuralnetworks@1.1::types
fb382e986c10b8fbb797a8546e8f9ea6d1107bfe6f3fb7e57f6bbbf1f807a906 android.hardware.neuralnetworks@1.2::IDevice
fb382e986c10b8fbb797a8546e8f9ea6d1107bfe6f3fb7e57f6bbbf1f807a906 android.hardware.neuralnetworks@1.2::IDevice
40e71cd693de5b832325c5d8f081f2ff20a7ba2b89d401cee5b4b3eb0e241681 android.hardware.neuralnetworks@1.2::IPreparedModel
40e71cd693de5b832325c5d8f081f2ff20a7ba2b89d401cee5b4b3eb0e241681 android.hardware.neuralnetworks@1.2::IPreparedModel
7f7ef383268c95a1b8fe4e55c662bc806bb0ac11a154f6b049a113a44b0f024f android.hardware.neuralnetworks@1.2::types
6c29d6fdd5445911df5456b3b84b949cdd59fca0c0b5507662f26a5cac0cf5e5 android.hardware.neuralnetworks@1.2::types
a785a57447a81e9c130eef6904c3a5c256076c6a04588c40620ebd6fa2660d77 android.hardware.radio@1.2::types
a785a57447a81e9c130eef6904c3a5c256076c6a04588c40620ebd6fa2660d77 android.hardware.radio@1.2::types
1a6e2bd289f22931c526b21916910f1d4c436b7acb9556e4243de4ce8e6cc2e4 android.hardware.soundtrigger@2.0::ISoundTriggerHwCallback
1a6e2bd289f22931c526b21916910f1d4c436b7acb9556e4243de4ce8e6cc2e4 android.hardware.soundtrigger@2.0::ISoundTriggerHwCallback
fd65298e1e09e0e3c781ab18305920d757dbe55a3b459ce17814ec5cf6dfee99 android.hardware.wifi@1.0::IWifiP2pIface
fd65298e1e09e0e3c781ab18305920d757dbe55a3b459ce17814ec5cf6dfee99 android.hardware.wifi@1.0::IWifiP2pIface
@@ -667,12 +667,12 @@ ddcf89cd8ee2df0d32aee55050826446fb64f7aafde0a7cd946c64f61b1a364c android.hardwar
df9c79c4fdde2821550c6d5c3d07f5ec0adfb1b702561ce543c906ddef698703 android.hardware.media.c2@1.1::IComponent
df9c79c4fdde2821550c6d5c3d07f5ec0adfb1b702561ce543c906ddef698703 android.hardware.media.c2@1.1::IComponent
a3eddd9bbdc87e8c22764070037dd1154f1cf006e6fba93364c4f85d4c134a19 android.hardware.media.c2@1.1::IComponentStore
a3eddd9bbdc87e8c22764070037dd1154f1cf006e6fba93364c4f85d4c134a19 android.hardware.media.c2@1.1::IComponentStore
65c16331e57f6dd68b3971f06f78fe9e3209afb60630c31705aa355f9a52bf0d android.hardware.neuralnetworks@1.3::IBuffer
65c16331e57f6dd68b3971f06f78fe9e3209afb60630c31705aa355f9a52bf0d android.hardware.neuralnetworks@1.3::IBuffer
9b41dd49e2dcc2ecb4243d03f8421d72494ada5cf2945bff88f0019eeca56923 android.hardware.neuralnetworks@1.3::IDevice
9db064ee44268a876be0367ff771e618362d39ec603b6ecab17e1575725fcd87 android.hardware.neuralnetworks@1.3::IDevice
4167dc3ad35e9cd0d2057d4868c7675ae2c3c9d05bbd614c1f5dccfa5fd68797 android.hardware.neuralnetworks@1.3::IExecutionCallback
4167dc3ad35e9cd0d2057d4868c7675ae2c3c9d05bbd614c1f5dccfa5fd68797 android.hardware.neuralnetworks@1.3::IExecutionCallback
2fa3679ad7c94b5e88724adcd560c561041068a4ca565c63830e68101988746a android.hardware.neuralnetworks@1.3::IFencedExecutionCallback
2fa3679ad7c94b5e88724adcd560c561041068a4ca565c63830e68101988746a android.hardware.neuralnetworks@1.3::IFencedExecutionCallback
237b23b126a66f3432658020fed78cdd06ba6297459436fe6bae0ba753370833 android.hardware.neuralnetworks@1.3::IPreparedModel
237b23b126a66f3432658020fed78cdd06ba6297459436fe6bae0ba753370833 android.hardware.neuralnetworks@1.3::IPreparedModel
0439a1fbbec7f16e5e4c653d85ac685d51bfafbae15b8f8cca530acdd7d6a8ce android.hardware.neuralnetworks@1.3::IPreparedModelCallback
0439a1fbbec7f16e5e4c653d85ac685d51bfafbae15b8f8cca530acdd7d6a8ce android.hardware.neuralnetworks@1.3::IPreparedModelCallback
3646950b10f7cacdafca13609b0e18496cea942f3bdfe920494661856eff48bb android.hardware.neuralnetworks@1.3::types
abbc4e1a969881c9f8ab587add5b5e75b08df834c9c969c013ae38cb4bb16f6a android.hardware.neuralnetworks@1.3::types
3e01d4446cd69fd1c48f8572efd97487bc179564b32bd795800b97bbe10be37b android.hardware.wifi@1.4::IWifi
3e01d4446cd69fd1c48f8572efd97487bc179564b32bd795800b97bbe10be37b android.hardware.wifi@1.4::IWifi
c67aaf26a7a40d14ea61e70e20afacbd0bb906df1704d585ac8599fbb69dd44b android.hardware.wifi.hostapd@1.2::IHostapd
c67aaf26a7a40d14ea61e70e20afacbd0bb906df1704d585ac8599fbb69dd44b android.hardware.wifi.hostapd@1.2::IHostapd
2b5a7ea572b736030c64a3b4043af244425477c4672301780fe15aba5ed393d9 android.hardware.wifi.hostapd@1.2::types
2b5a7ea572b736030c64a3b4043af244425477c4672301780fe15aba5ed393d9 android.hardware.wifi.hostapd@1.2::types
+1 −1
Original line number Original line Diff line number Diff line
@@ -3165,7 +3165,7 @@ enum OperationType : int32_t {
     * * 8: An {@link OperandType::INT32} scalar, specifying the stride when
     * * 8: An {@link OperandType::INT32} scalar, specifying the stride when
     *      walking through input in the ‘height’ dimension.
     *      walking through input in the ‘height’ dimension.
     * * 9: An {@link OperandType::INT32} scalar, specifying the number of
     * * 9: An {@link OperandType::INT32} scalar, specifying the number of
            groups.
     *      groups.
     * * 10: An {@link OperandType::INT32} scalar, and has to be one of the
     * * 10: An {@link OperandType::INT32} scalar, and has to be one of the
     *       {@link FusedActivationFunc} values. Specifies the activation to
     *       {@link FusedActivationFunc} values. Specifies the activation to
     *       invoke on the result.
     *       invoke on the result.
+1 −1
Original line number Original line Diff line number Diff line
@@ -372,5 +372,5 @@ interface IDevice extends @1.2::IDevice {
     */
     */
    allocate(BufferDesc desc, vec<IPreparedModel> preparedModels, vec<BufferRole> inputRoles,
    allocate(BufferDesc desc, vec<IPreparedModel> preparedModels, vec<BufferRole> inputRoles,
             vec<BufferRole> outputRoles)
             vec<BufferRole> outputRoles)
            generates (ErrorStatus status, IBuffer buffer, int32_t token);
            generates (ErrorStatus status, IBuffer buffer, uint32_t token);
};
};
+5 −25
Original line number Original line Diff line number Diff line
@@ -22,9 +22,9 @@ import @1.0::PerformanceInfo;
import @1.0::RequestArgument;
import @1.0::RequestArgument;
import @1.2::Model.ExtensionNameAndPrefix;
import @1.2::Model.ExtensionNameAndPrefix;
import @1.2::Model.ExtensionTypeEncoding;
import @1.2::Model.ExtensionTypeEncoding;
import @1.2::Operand.ExtraParams;
import @1.2::OperandType;
import @1.2::OperandType;
import @1.2::OperationType;
import @1.2::OperationType;
import @1.2::SymmPerChannelQuantParams;


import android.hidl.safe_union@1.0::Monostate;
import android.hidl.safe_union@1.0::Monostate;


@@ -3253,7 +3253,7 @@ enum OperationType : int32_t {
     * * 8: An {@link OperandType::INT32} scalar, specifying the stride when
     * * 8: An {@link OperandType::INT32} scalar, specifying the stride when
     *      walking through input in the ‘height’ dimension.
     *      walking through input in the ‘height’ dimension.
     * * 9: An {@link OperandType::INT32} scalar, specifying the number of
     * * 9: An {@link OperandType::INT32} scalar, specifying the number of
            groups.
     *      groups.
     * * 10: An {@link OperandType::INT32} scalar, and has to be one of the
     * * 10: An {@link OperandType::INT32} scalar, and has to be one of the
     *       {@link FusedActivationFunc} values. Specifies the activation to
     *       {@link FusedActivationFunc} values. Specifies the activation to
     *       invoke on the result.
     *       invoke on the result.
@@ -5343,27 +5343,7 @@ struct Operand {
    /**
    /**
     * Additional parameters specific to a particular operand type.
     * Additional parameters specific to a particular operand type.
     */
     */
    safe_union ExtraParams {
    @1.2::Operand.ExtraParams extraParams;
       /**
        * No additional parameters.
        */
       Monostate none;

       /**
        * Symmetric per-channel quantization parameters.
        *
        * Only applicable to operands of type TENSOR_QUANT8_SYMM_PER_CHANNEL.
        */
       SymmPerChannelQuantParams channelQuant;

       /**
        * Extension operand parameters.
        *
        * The framework treats this as an opaque data blob.
        * The format is up to individual extensions.
        */
       vec<uint8_t> extension;
    } extraParams;
};
};


/**
/**
@@ -5551,7 +5531,7 @@ struct Request {
         * Specifies a driver-managed buffer. It is the token returned from IDevice::allocate,
         * Specifies a driver-managed buffer. It is the token returned from IDevice::allocate,
         * and is specific to the IDevice object.
         * and is specific to the IDevice object.
         */
         */
        int32_t token;
        uint32_t token;
    };
    };


    /**
    /**
@@ -5573,7 +5553,7 @@ safe_union OptionalTimePoint {
     * Time point of the steady clock (as from std::chrono::steady_clock)
     * Time point of the steady clock (as from std::chrono::steady_clock)
     * measured in nanoseconds.
     * measured in nanoseconds.
     */
     */
    uint64_t nanoseconds;
    uint64_t nanosecondsSinceEpoch;
};
};


/**
/**
+4 −24
Original line number Original line Diff line number Diff line
@@ -24,9 +24,9 @@ import @1.0::PerformanceInfo;
import @1.0::RequestArgument;
import @1.0::RequestArgument;
import @1.2::Model.ExtensionNameAndPrefix;
import @1.2::Model.ExtensionNameAndPrefix;
import @1.2::Model.ExtensionTypeEncoding;
import @1.2::Model.ExtensionTypeEncoding;
import @1.2::Operand.ExtraParams;
import @1.2::OperandType;
import @1.2::OperandType;
import @1.2::OperationType;
import @1.2::OperationType;
import @1.2::SymmPerChannelQuantParams;


import android.hidl.safe_union@1.0::Monostate;
import android.hidl.safe_union@1.0::Monostate;


@@ -319,27 +319,7 @@ struct Operand {
    /**
    /**
     * Additional parameters specific to a particular operand type.
     * Additional parameters specific to a particular operand type.
     */
     */
    safe_union ExtraParams {
    @1.2::Operand.ExtraParams extraParams;
       /**
        * No additional parameters.
        */
       Monostate none;

       /**
        * Symmetric per-channel quantization parameters.
        *
        * Only applicable to operands of type TENSOR_QUANT8_SYMM_PER_CHANNEL.
        */
       SymmPerChannelQuantParams channelQuant;

       /**
        * Extension operand parameters.
        *
        * The framework treats this as an opaque data blob.
        * The format is up to individual extensions.
        */
       vec<uint8_t> extension;
    } extraParams;
};
};


/**
/**
@@ -527,7 +507,7 @@ struct Request {
         * Specifies a driver-managed buffer. It is the token returned from IDevice::allocate,
         * Specifies a driver-managed buffer. It is the token returned from IDevice::allocate,
         * and is specific to the IDevice object.
         * and is specific to the IDevice object.
         */
         */
        int32_t token;
        uint32_t token;
    };
    };


    /**
    /**
@@ -549,7 +529,7 @@ safe_union OptionalTimePoint {
     * Time point of the steady clock (as from std::chrono::steady_clock)
     * Time point of the steady clock (as from std::chrono::steady_clock)
     * measured in nanoseconds.
     * measured in nanoseconds.
     */
     */
    uint64_t nanoseconds;
    uint64_t nanosecondsSinceEpoch;
};
};


/**
/**
Loading