aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/ops/ewise_ternary.h
diff options
context:
space:
mode:
authorTai Ly <tai.ly@arm.com>2023-03-28 22:06:56 +0000
committerTai Ly <tai.ly@arm.com>2023-05-05 19:23:15 +0000
commita4d748b08accce06fab93e2d2b96e499b35ae89b (patch)
tree20a3957e1f45f65f35d5d67ecce1618659e388f0 /reference_model/src/ops/ewise_ternary.h
parent0c71686875618b2e11290273b7a05b88ef8a8aae (diff)
downloadreference_model-a4d748b08accce06fab93e2d2b96e499b35ae89b.tar.gz
[reference model] Add precise mode
This adds --precise_mode=1 option to tosa_referece_model, which will cause reference model to convert all floating point tensors to FP64 tensors and compute all operators accordingly. Also adds optional -p arguments to test runners tosa_verif_run_tests.py and tosa_verif_framework_compiler_runner.py to run tests in precise mode Signed-off-by: Tai Ly <tai.ly@arm.com> Change-Id: I156055216ad61710096497a8fa1a653be2a602a3
Diffstat (limited to 'reference_model/src/ops/ewise_ternary.h')
-rw-r--r--reference_model/src/ops/ewise_ternary.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/reference_model/src/ops/ewise_ternary.h b/reference_model/src/ops/ewise_ternary.h
index 75a2194..c6970cb 100644
--- a/reference_model/src/ops/ewise_ternary.h
+++ b/reference_model/src/ops/ewise_ternary.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2020, ARM Limited.
+// Copyright (c) 2020-2023, ARM Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ namespace TosaReference
// 3. Else_val: Rank N, type=<V>
// 4. Result: Rank N, type=<V>
// Cond, Then_val, Else_val need to be mutually-broadcastable
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpSelectBase : public GraphNode
{
public:
@@ -39,7 +39,7 @@ public:
virtual int checkTensorAttributes();
virtual int eval();
- using CondEigenType = typename GetEigenType<DType_BOOL>::type;
+ using CondEigenType = typename GetEigenType<TOSA_REF_TYPE_BOOL>::type;
using InEigenType = typename GetEigenType<Dtype>::type;
using TCond = Eigen::Tensor<CondEigenType, Rank>;
using TIn = Eigen::Tensor<InEigenType, Rank>;
@@ -55,7 +55,7 @@ protected:
};
// primary class
-template <int Rank, DType Dtype>
+template <int Rank, TOSA_REF_TYPE Dtype>
class OpSelect : public OpSelectBase<Rank, Dtype>
{
public:
@@ -69,7 +69,7 @@ public:
};
// partial specialization for rank 0
-template <DType Dtype>
+template <TOSA_REF_TYPE Dtype>
class OpSelect<0, Dtype> : public OpSelectBase<0, Dtype>
{
public: