* limitations under the License.
*/
-/* This HAL is a work in progress */
-
package android.hardware.neuralnetworks@1.0;
import IEvent;
/**
* 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);
*
* @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
* it is describing.
*/
getSupportedOperations(Model model)
- generates (ErrorStatus status, vec<bool> supportedOperations);
+ generates (ErrorStatus status, vec<bool> supportedOperations);
/**
* Prepares a model for execution.
* 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.
* @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);
};