aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/ClBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backends/cl/ClBackend.cpp')
-rw-r--r--src/backends/cl/ClBackend.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/backends/cl/ClBackend.cpp b/src/backends/cl/ClBackend.cpp
index 339c1aa398..cf5f50025a 100644
--- a/src/backends/cl/ClBackend.cpp
+++ b/src/backends/cl/ClBackend.cpp
@@ -227,18 +227,18 @@ OptimizationViews ClBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
{
OptimizationViews optimizationViews;
- auto it = subgraph.end();
+ auto it = subgraph.endIConnectable();
bool isFastMathEnabled = false;
std::map<LayerGuid, Layer*> untouched;
- while (it != subgraph.begin())
+ while (it != subgraph.beginIConnectable())
{
--it;
- Layer& base = **it;
+ Layer& base = *(PolymorphicDowncast<Layer*>(*it));
untouched.insert({base.GetGuid(), &base});
}
- it = subgraph.end();
+ it = subgraph.endIConnectable();
#if defined(ARMCOMPUTECL_ENABLED)
IBackendInternal::IBackendSpecificModelContextPtr modelContextPtr = CreateBackendSpecificModelContext(modelOptions);
@@ -251,10 +251,10 @@ OptimizationViews ClBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
}
}
#endif
- while (it != subgraph.begin())
+ while (it != subgraph.beginIConnectable())
{
--it;
- Layer& base = **it;
+ Layer& base = *(PolymorphicDowncast<Layer*>(*it));
// Fuse activation into previous layer if supported by backend
if ((base.GetType() == LayerType::DepthwiseConvolution2d || base.GetType() == LayerType::Convolution2d
@@ -498,9 +498,9 @@ OptimizationViews ClBackend::OptimizeSubgraphView(const SubgraphView& subgraph,
if (!reduceDescriptor.m_vAxis.empty() && reduceDescriptor.m_vAxis.size() > 1)
{
// Add new layers to the graph and connect them.
- std::vector<Layer*> layers = ChainReduceLayers<ReduceLayer>(optimizationViews,
- baseLayer,
- reduceDescriptor);
+ std::vector<IConnectableLayer*> layers = ChainReduceLayers<ReduceLayer>(optimizationViews,
+ baseLayer,
+ reduceDescriptor);
// Replace existing baselayer with new subgraph.
ReplaceLayers<ReduceLayer>(optimizationViews, baseLayer, layers);