| 558 | } |
| 559 | |
| 560 | bool LayerSupportHandle::IsDilatedDepthwiseConvolutionSupported( |
| 561 | const TensorInfo& input, |
| 562 | const TensorInfo& output, |
| 563 | const DepthwiseConvolution2dDescriptor& descriptor, |
| 564 | const TensorInfo& weights, |
| 565 | const Optional<TensorInfo>& biases, |
| 566 | Optional<std::string&> reasonIfUnsupported) |
| 567 | { |
| 568 | TensorInfo biasesVal = biases.has_value() ? biases.value() : TensorInfo(); |
| 569 | TensorInfos infos{input, output, weights, biasesVal}; |
| 570 | |
| 571 | Optional<const BackendOptions::BackendOption> capability ; |
| 572 | if (!m_BackendId.IsUndefined()) |
| 573 | { |
| 574 | capability = GetCapability("NonConstWeights", m_BackendId); |
| 575 | if (!capability.has_value() || capability.value().GetValue().AsBool() == false) |
| 576 | { |
| 577 | if (!weights.IsConstant()) |
| 578 | { |
| 579 | if (reasonIfUnsupported.has_value()) |
| 580 | { |
| 581 | reasonIfUnsupported.value() = |
| 582 | "Backend is not capable of supporting dynamic weights (NonConstWeights) and " |
| 583 | "DilatedDepthwiseConvolution2d weights are set as dynamic (non constant). "; |
| 584 | } |
| 585 | return false; |
| 586 | } |
| 587 | if (descriptor.m_BiasEnabled && !biasesVal.IsConstant()) |
| 588 | { |
| 589 | if (reasonIfUnsupported.has_value()) |
| 590 | { |
| 591 | reasonIfUnsupported.value() = |
| 592 | "Backend is not capable of supporting dynamic biases (NonConstWeights) and " |
| 593 | "DilatedDepthwiseConvolution2d biases are set as dynamic (non constant). "; |
| 594 | } |
| 595 | return false; |
| 596 | } |
| 597 | // At the first stage we will only print a warning. this is to give |
| 598 | // backend developers a chance to adopt and read weights from input slots. |
| 599 | ARMNN_LOG(warning) << "The backend makes use of a deprecated interface to read constant tensors. " |
| 600 | "If you are a backend developer please find more information in our " |
| 601 | "doxygen documentation on github https://github.com/ARM-software/armnn " |
| 602 | "under the keyword 'ConstTensorsAsInputs'."; |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | return m_LayerSupport->IsLayerSupported(LayerType::DepthwiseConvolution2d, |
| 607 | infos, |
| 608 | descriptor, |
| 609 | EmptyOptional(), |
| 610 | EmptyOptional(), |
| 611 | reasonIfUnsupported); |
| 612 | } |
| 613 | |
| 614 | bool LayerSupportHandle::IsDivisionSupported(const TensorInfo& input0, |
| 615 | const TensorInfo& input1, |
nothing calls this directly
no test coverage detected