diff options
author | David Gross | 2018-06-05 14:51:08 -0500 |
---|---|---|
committer | David Gross | 2018-06-05 14:51:08 -0500 |
commit | 8939b5df129777b6597f5f973552ae99ab956b35 (patch) | |
tree | 7b9abffcd2b0e90f33d3e34372b924c19bcdfe0c | |
parent | c357006160bcf042dac078037e9519e12c9184aa (diff) | |
download | platform-hardware-interfaces-8939b5df129777b6597f5f973552ae99ab956b35.tar.gz platform-hardware-interfaces-8939b5df129777b6597f5f973552ae99ab956b35.tar.xz platform-hardware-interfaces-8939b5df129777b6597f5f973552ae99ab956b35.zip |
Document unspecified dimensions.
Test: mm
Bug: 77234888
Bug: 109687058
Change-Id: Ia8928e494d8c712bc9cfb592d67476fde9753f45
-rw-r--r-- | current.txt | 2 | ||||
-rw-r--r-- | neuralnetworks/1.0/types.hal | 52 |
2 files changed, 49 insertions, 5 deletions
diff --git a/current.txt b/current.txt index 5ccd6abe..b3f2ff6e 100644 --- a/current.txt +++ b/current.txt | |||
@@ -260,7 +260,7 @@ fb92e2b40f8e9d494e8fd3b4ac18499a3216342e7cff160714c3bbf3660b6e79 android.hardwar | |||
260 | 4e7169919d24fbe5573e5bcd683d0bd7abf553a4e6c34c41f9dfc1e12050db07 android.hardware.gnss@1.0::IGnssNavigationMessageCallback | 260 | 4e7169919d24fbe5573e5bcd683d0bd7abf553a4e6c34c41f9dfc1e12050db07 android.hardware.gnss@1.0::IGnssNavigationMessageCallback |
261 | 5804ca86611d72e5481f022b3a0c1b334217f2e4988dad25730c42af2d1f4d1c android.hardware.neuralnetworks@1.0::IDevice | 261 | 5804ca86611d72e5481f022b3a0c1b334217f2e4988dad25730c42af2d1f4d1c android.hardware.neuralnetworks@1.0::IDevice |
262 | 12e8dca4ab7d8aadd0ef8f1b438021938e2396139e85db2ed65783b08800aa52 android.hardware.neuralnetworks@1.0::IExecutionCallback | 262 | 12e8dca4ab7d8aadd0ef8f1b438021938e2396139e85db2ed65783b08800aa52 android.hardware.neuralnetworks@1.0::IExecutionCallback |
263 | 18e6885e184fe48401c2c53f1d1b8bfb07240f40c81ae6b9d2e336fca6efdbb7 android.hardware.neuralnetworks@1.0::types | 263 | 86b77e06da756a76aa3685be88765852dd982a86d8c90b8b4fc1130ed4184c8f android.hardware.neuralnetworks@1.0::types |
264 | d4840db8efabdf1e4b344fc981cd36e5fe81a39aff6e199f6d06c1c8da413efd android.hardware.radio@1.0::types | 264 | d4840db8efabdf1e4b344fc981cd36e5fe81a39aff6e199f6d06c1c8da413efd android.hardware.radio@1.0::types |
265 | b280c4704dfcc548a9bf127b59b7c3578f460c50cce70a06b66fe0df8b27cff0 android.hardware.wifi@1.0::types | 265 | b280c4704dfcc548a9bf127b59b7c3578f460c50cce70a06b66fe0df8b27cff0 android.hardware.wifi@1.0::types |
266 | 266 | ||
diff --git a/neuralnetworks/1.0/types.hal b/neuralnetworks/1.0/types.hal index 4efa13ad..1ae1726c 100644 --- a/neuralnetworks/1.0/types.hal +++ b/neuralnetworks/1.0/types.hal | |||
@@ -1519,6 +1519,41 @@ struct Operand { | |||
1519 | 1519 | ||
1520 | /** | 1520 | /** |
1521 | * Dimensions of the operand. | 1521 | * Dimensions of the operand. |
1522 | * | ||
1523 | * For a scalar operand, dimensions.size() must be 0. | ||
1524 | * | ||
1525 | * For a tensor operand, dimensions.size() must be at least 1; | ||
1526 | * however, any of the dimensions may be unspecified. | ||
1527 | * | ||
1528 | * A tensor operand with all dimensions specified has "fully | ||
1529 | * specified" dimensions. Whenever possible (i.e., whenever the | ||
1530 | * dimensions are known at model construction time), a tensor | ||
1531 | * operand should have (but is not required to have) fully | ||
1532 | * specified dimensions, in order to enable the best possible | ||
1533 | * performance. | ||
1534 | * | ||
1535 | * If a tensor operand's dimensions are not fully specified, the | ||
1536 | * dimensions of the operand are deduced from the operand | ||
1537 | * dimensions and values of the operation for which that operand | ||
1538 | * is an output. | ||
1539 | * | ||
1540 | * In the following situations, a tensor operand's dimensions must | ||
1541 | * be fully specified: | ||
1542 | * | ||
1543 | * . The operand has lifetime CONSTANT_COPY or | ||
1544 | * CONSTANT_REFERENCE. | ||
1545 | * | ||
1546 | * . The operand has lifetime MODEL_INPUT or MODEL_OUTPUT. Fully | ||
1547 | * specified dimensions must either be present in the | ||
1548 | * Operand or they must be provided in the corresponding | ||
1549 | * RequestArgument. | ||
1550 | * EXCEPTION: If the input or output is optional and omitted | ||
1551 | * (by setting the hasNoValue field of the corresponding | ||
1552 | * RequestArgument to true) then it need not have fully | ||
1553 | * specified dimensions. | ||
1554 | * | ||
1555 | * A tensor operand with some number of unspecified dimensions is | ||
1556 | * represented by setting each unspecified dimension to 0. | ||
1522 | */ | 1557 | */ |
1523 | vec<uint32_t> dimensions; | 1558 | vec<uint32_t> dimensions; |
1524 | 1559 | ||
@@ -1662,10 +1697,19 @@ struct RequestArgument { | |||
1662 | /** | 1697 | /** |
1663 | * Updated dimension information. | 1698 | * Updated dimension information. |
1664 | * | 1699 | * |
1665 | * If dimensions.size() > 0, dimension information was provided along with | 1700 | * If dimensions.size() > 0, dimension information was provided |
1666 | * the argument. This can be the case for models that accept inputs of | 1701 | * along with the argument. This can be the case for models that |
1667 | * varying size. This can't change the rank, just the value of the | 1702 | * accept inputs of varying size. This can't change the rank, just |
1668 | * dimensions that were unspecified in the model. | 1703 | * the value of the dimensions that were unspecified in the |
1704 | * model. If dimensions.size() > 0, then all dimensions must be | ||
1705 | * specified here; and any dimension that was specified in the | ||
1706 | * model must have the same value here. | ||
1707 | * | ||
1708 | * If the dimensions in the model are not fully specified, then | ||
1709 | * they must be fully specified here, unless hasNoValue is set to | ||
1710 | * true. If the dimensions in the model are fully specified, then | ||
1711 | * either dimensions.size() may be 0, or the dimensions in the | ||
1712 | * model must be identical to the dimensions here. | ||
1669 | */ | 1713 | */ |
1670 | vec<uint32_t> dimensions; | 1714 | vec<uint32_t> dimensions; |
1671 | }; | 1715 | }; |