OSDN Git Service

Removed WIP tag from Neuralnetworks HAL
[android-x86/hardware-interfaces.git] / neuralnetworks / 1.0 / IDevice.hal
index b6f9433..91a9555 100644 (file)
@@ -14,8 +14,6 @@
  * limitations under the License.
  */
 
-/* This HAL is a work in progress */
-
 package android.hardware.neuralnetworks@1.0;
 
 import IEvent;
@@ -28,7 +26,10 @@ interface IDevice {
     /**
      * Gets the capabilities of a driver.
      *
-     * @return status ErrorStatus::NONE if successful.
+     * @return status Error status of the call, must be:
+     *                - NONE if successful
+     *                - DEVICE_UNAVAILABLE if driver is offline or busy
+     *                - GENERAL_FAILURE if there is an unspecified error
      * @return capabilities Capabilities of the driver.
      */
     getCapabilities() generates (ErrorStatus status, Capabilities capabilities);
@@ -43,7 +44,11 @@ interface IDevice {
      *
      * @param model A model whose operations--and their corresponding
      *              operands--are to be verified by the driver.
-     * @return status ErrorStatus::NONE if successful.
+     * @return status Error status of the call, must be:
+     *                - NONE if successful
+     *                - DEVICE_UNAVAILABLE if driver is offline or busy
+     *                - GENERAL_FAILURE if there is an unspecified error
+     *                - INVALID_ARGUMENT when provided model is invalid
      * @return supportedOperations A list of supported operations, where true
      *                             indicates the operation is supported and
      *                             false indicates the operation is not
@@ -52,7 +57,7 @@ interface IDevice {
      *                             it is describing.
      */
     getSupportedOperations(Model model)
-            generates (ErrorStatus status, vec<bool> supportedOperations);
+                generates (ErrorStatus status, vec<bool> supportedOperations);
 
     /**
      * Prepares a model for execution.
@@ -60,7 +65,7 @@ interface IDevice {
      * prepareModel is used to make any necessary transformations or alternative
      * representations to a model for execution, possible including
      * transformations on the constant data, optimization on the model's graph,
-     * or compilation into the device's native binary.
+     * or compilation into the device's native binary format.
      *
      * The only information that may be unknown to the model at this stage is
      * the shape of the tensors, which may only be known at execution time.
@@ -68,16 +73,25 @@ interface IDevice {
      * @param model The model to be prepared for execution.
      * @param event A synchronization callback that must be signaled once the
      *              execution has finished.
-     * @return status ErrorStatus::NONE if successful.
+     * @return status Error status of the call, must be:
+     *                - NONE if preparation task is successfully launched
+     *                - DEVICE_UNAVAILABLE if driver is offline or busy
+     *                - GENERAL_FAILURE if there is an unspecified error
+     *                - INVALID_ARGUMENT when one of the input arguments is
+     *                  invalid
      * @return preparedModel A handle to the resultant prepared model.
      */
     prepareModel(Model model, IEvent event)
-            generates (ErrorStatus status, IPreparedModel preparedModel);
+      generates (ErrorStatus status, IPreparedModel preparedModel);
 
     /**
      * Returns the current status of a driver.
      *
-     * @return status Status of the driver.
+     * @return status Status of the driver, one of:
+     *                - DeviceStatus::AVAILABLE
+     *                - DeviceStatus::BUSY
+     *                - DeviceStatus::OFFLINE
+     *                - DeviceStatus::UNKNOWN
      */
     getStatus() generates (DeviceStatus status);
 };