IVGCVSW-7344  Add LeakyRelu Activation support to TOSA Reference Backend

  * Adding a one to many FP32 tosa mapping for Leaky Relu
  * Added a few utilities that are needed
  * Added new tests

Signed-off-by: Tracy Narine <tracy.narine@arm.com>
Change-Id: If1d7c57a523961581777a244416a7346a9310803
diff --git a/src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp b/src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp
index e43f6ca..05ccef4 100644
--- a/src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp
+++ b/src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp
@@ -1,5 +1,5 @@
 //
-// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2024 Arm Ltd and Contributors. All rights reserved.
 // SPDX-License-Identifier: MIT
 //
 
@@ -12,6 +12,7 @@
 #include "common/include/ProfilingGuid.hpp"
 
 #include <tosa_serialization_handler.h>
+#include <version.h>
 
 using namespace armnn;
 using namespace tosa;
@@ -355,7 +356,6 @@
     return uint8Data;
 }
 
-
 inline std::vector<uint8_t> CreateConstTosaData(const void* value,
                                                 DType dtype,
                                                 const std::vector<int32_t>& shape)
@@ -452,4 +452,10 @@
 
     tensor = new TosaSerializationTensor(outputName, shape, dtype, uint8Data);
     ARMNN_THROW_MSG_IF_FALSE(tensor, armnn::Exception, "CreateConstTosaOperator: failed to created tensor");
-}
\ No newline at end of file
+}
+
+// Macro to conditionally compile Tosa code
+#define TOSA_FWD_COMPAT_VERSION(_major, _minor, _patch) \
+        (TOSA_REFERENCE_MODEL_VERSION_MAJOR >= _major) && \
+        (TOSA_REFERENCE_MODEL_VERSION_MINOR >= _minor) && \
+        (TOSA_REFERENCE_MODEL_VERSION_PATCH >= _patch)