platform_hardware_interfaces/neuralnetworks
Michael Butler a685c3dbf4 Create conversions to/from NNAPI canonical types
This CL creates the following primary sets of functions:
* V1_X::utils::convert(<canonical_type>) -- Converts a canonical type
  to the corresponding HAL version type.
* nn::convert(<V1_X_HAL_type>) -- Converts a HAL version type to the
  corresponding canonical type.
* neuralnetworks::utils::hasNoPointerData -- Indicates if the object
  contains no pointer-based data that could be relocated to shared
  memory.
* neuralnetworks::utils::flushDataFromPointerToShared -- Relocate
  pointer-based data to shared memory.
* neuralnetworks::utils::unflushDataFromSharedToPointer -- Undoes
  `flushDataFromPointerToShared` on a Request object. More
  specifically, `unflushDataFromSharedToPointer` copies the output
  shared memory data from the transformed Request object back to the
  output pointer-based memory in the original Request object.

It also introduces some other minor utility code, including
makeQuantized8PerformanceConsistentWithP, countNumberOfConsumers,
validate, valid, and validatedConvertToCanonical.

Bug: 160667419
Test: mma
Change-Id: I0732e658c1f4ed40cd122f1ca8581fb40b056757
2020-10-01 11:32:53 -07:00
..
1.0 Create conversions to/from NNAPI canonical types 2020-10-01 11:32:53 -07:00
1.1 Create conversions to/from NNAPI canonical types 2020-10-01 11:32:53 -07:00
1.2 Create conversions to/from NNAPI canonical types 2020-10-01 11:32:53 -07:00
1.3 Create conversions to/from NNAPI canonical types 2020-10-01 11:32:53 -07:00
utils Create conversions to/from NNAPI canonical types 2020-10-01 11:32:53 -07:00
README Add README to NeuralNetworks HAL 2018-03-05 12:59:35 -08:00
TEST_MAPPING Change NNAPI VTS TEST_MAPPING to restrict testing on sample drivers 2019-10-29 19:08:38 -07:00

NeuralNetworks sample driver implementation is located at
frameworks/ml/nn/driver/sample.