COMPMID-556 Add macro for checking graph's tensor object
Change-Id: I1de1c2932c9906b23b49e18bd82c173846d98723
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/93860
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
diff --git a/src/graph/nodes/ActivationLayer.cpp b/src/graph/nodes/ActivationLayer.cpp
index d335214..54f30ef 100644
--- a/src/graph/nodes/ActivationLayer.cpp
+++ b/src/graph/nodes/ActivationLayer.cpp
@@ -23,6 +23,7 @@
*/
#include "arm_compute/graph/nodes/ActivationLayer.h"
+#include "arm_compute/graph/Error.h"
#include "arm_compute/graph/NodeContext.h"
#include "arm_compute/graph/OperationRegistry.h"
#include "support/ToolchainSupport.h"
@@ -36,8 +37,7 @@
std::unique_ptr<arm_compute::IFunction> ActivationLayer::instantiate_node(GraphContext &ctx, ITensorObject *input, ITensorObject *output)
{
- ARM_COMPUTE_ERROR_ON(input == nullptr || input->tensor() == nullptr);
- ARM_COMPUTE_ERROR_ON(output == nullptr || output->tensor() == nullptr);
+ ARM_COMPUTE_ERROR_ON_UNALLOCATED_TENSOR_OBJECT(input, output);
arm_compute::ITensor *in = input->tensor();
arm_compute::ITensor *out = output->tensor();