| 1515 | } |
| 1516 | |
| 1517 | bool ClLayerSupport::IsSplitterSupported(const TensorInfo& input, |
| 1518 | const std::vector<std::reference_wrapper<TensorInfo>>& outputs, |
| 1519 | const ViewsDescriptor& descriptor, |
| 1520 | Optional<std::string&> reasonIfUnsupported) const |
| 1521 | { |
| 1522 | #if defined(ARMCOMPUTECL_ENABLED) |
| 1523 | // Split along the last dimension, cannot use sub-tensors |
| 1524 | // as width and height of the sub-tensors do not match |
| 1525 | // the width and height of the parent tensor |
| 1526 | // in case of input with more than 2D. |
| 1527 | std::set<unsigned int> splitAxis = ComputeSplitAxis(descriptor, input.GetShape()); |
| 1528 | if (descriptor.GetNumDimensions() > 2 && splitAxis.size() == 1 && |
| 1529 | *splitAxis.begin() == descriptor.GetNumDimensions() - 1 ) |
| 1530 | { |
| 1531 | FORWARD_WORKLOAD_VALIDATE_FUNC(ClSplitterWorkloadValidate, |
| 1532 | reasonIfUnsupported, |
| 1533 | input, |
| 1534 | outputs, |
| 1535 | *splitAxis.begin()); |
| 1536 | } |
| 1537 | #endif |
| 1538 | IgnoreUnused(descriptor); |
| 1539 | for (auto output : outputs) |
| 1540 | { |
| 1541 | if (!input.IsTypeSpaceMatch(output)) // Cannot use sub-tensors if the types are not same space |
| 1542 | { |
| 1543 | SetValueChecked(reasonIfUnsupported, "Cl Splitter: Types and quantization parameters must match."); |
| 1544 | return false; |
| 1545 | } |
| 1546 | } |
| 1547 | return true; |
| 1548 | } |
| 1549 | |
| 1550 | bool ClLayerSupport::IsStackSupported(const std::vector<const TensorInfo*>& inputs, |
| 1551 | const TensorInfo& output, |
no test coverage detected