diff options
Diffstat (limited to 'src/graph/nodes/SoftmaxLayer.cpp')
-rw-r--r-- | src/graph/nodes/SoftmaxLayer.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/graph/nodes/SoftmaxLayer.cpp b/src/graph/nodes/SoftmaxLayer.cpp index fee88970fc..9e798ef7cc 100644 --- a/src/graph/nodes/SoftmaxLayer.cpp +++ b/src/graph/nodes/SoftmaxLayer.cpp @@ -34,7 +34,7 @@ using namespace arm_compute::graph; namespace { -template <typename SoftmaxType, typename TensorType, Hint hint> +template <typename SoftmaxType, typename TensorType, TargetHint hint> std::unique_ptr<arm_compute::IFunction> instantiate_function(ITensor *input, ITensor *output) { auto softmax = arm_compute::support::cpp14::make_unique<SoftmaxType>(); @@ -45,36 +45,36 @@ std::unique_ptr<arm_compute::IFunction> instantiate_function(ITensor *input, ITe return std::move(softmax); } -template <Hint hint> +template <TargetHint target_hint> std::unique_ptr<arm_compute::IFunction> instantiate(ITensor *input, ITensor *output); template <> -std::unique_ptr<arm_compute::IFunction> instantiate<Hint::OPENCL>(ITensor *input, ITensor *output) +std::unique_ptr<arm_compute::IFunction> instantiate<TargetHint::OPENCL>(ITensor *input, ITensor *output) { - return instantiate_function<arm_compute::CLSoftmaxLayer, arm_compute::CLTensor, Hint::OPENCL>(input, output); + return instantiate_function<arm_compute::CLSoftmaxLayer, arm_compute::CLTensor, TargetHint::OPENCL>(input, output); } template <> -std::unique_ptr<arm_compute::IFunction> instantiate<Hint::NEON>(ITensor *input, ITensor *output) +std::unique_ptr<arm_compute::IFunction> instantiate<TargetHint::NEON>(ITensor *input, ITensor *output) { - return instantiate_function<arm_compute::NESoftmaxLayer, arm_compute::Tensor, Hint::NEON>(input, output); + return instantiate_function<arm_compute::NESoftmaxLayer, arm_compute::Tensor, TargetHint::NEON>(input, output); } } // namespace -std::unique_ptr<arm_compute::IFunction> SoftmaxLayer::instantiate_node(Hint hint, ITensor *input, ITensor *output) +std::unique_ptr<arm_compute::IFunction> SoftmaxLayer::instantiate_node(GraphContext &ctx, ITensor *input, ITensor *output) { std::unique_ptr<arm_compute::IFunction> func; - _hint = hint; - _input = input; - _output = output; + _target_hint = ctx.hints().target_hint(); + _input = input; + _output = output; - if(_hint == Hint::OPENCL) + if(_target_hint == TargetHint::OPENCL) { - func = instantiate<Hint::OPENCL>(input, output); + func = instantiate<TargetHint::OPENCL>(input, output); } else { - func = instantiate<Hint::NEON>(input, output); + func = instantiate<TargetHint::NEON>(input, output); } return func; @@ -82,7 +82,7 @@ std::unique_ptr<arm_compute::IFunction> SoftmaxLayer::instantiate_node(Hint hint void SoftmaxLayer::print_info() { - if(_hint == Hint::OPENCL) + if(_target_hint == TargetHint::OPENCL) { std::cout << "Instantiating CLSoftmaxLayer"; } |