aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/ops/tensor_ops.cc
diff options
context:
space:
mode:
authorKevin Cheng <kevin.cheng@arm.com>2021-03-03 11:21:43 -0800
committerKevin Cheng <kevin.cheng@arm.com>2021-04-27 16:01:59 -0700
commit550ccc52de231621c0bf0c05ae2a398eec37ff51 (patch)
treed4a5bd8d24560135784208c0fe35615b1d043249 /reference_model/src/ops/tensor_ops.cc
parentcf6224e6e8ba4fc2984de3e542538c38e27c9f57 (diff)
downloadreference_model-550ccc52de231621c0bf0c05ae2a398eec37ff51.tar.gz
Replace serialization/ and verif/ with MLPlatform's serialization_lib submodule
- Remove Usage and Format - Run black on verif/*.py scripts Signed-off-by: Kevin Cheng <kevin.cheng@arm.com> Change-Id: Ie81515891eb0039540f614894f4b6b0e0e78ba74
Diffstat (limited to 'reference_model/src/ops/tensor_ops.cc')
-rw-r--r--reference_model/src/ops/tensor_ops.cc63
1 files changed, 0 insertions, 63 deletions
diff --git a/reference_model/src/ops/tensor_ops.cc b/reference_model/src/ops/tensor_ops.cc
index d6cd1cd..b8c7ade 100644
--- a/reference_model/src/ops/tensor_ops.cc
+++ b/reference_model/src/ops/tensor_ops.cc
@@ -103,12 +103,6 @@ int OpAvgPool2d<Dtype>::checkTensorAttributes()
in = dynamic_cast<TosaReference::TensorTemplate<TIn>*>(inputs[0]);
out = dynamic_cast<TosaReference::TensorTemplate<TOut>*>(outputs[0]);
- if (!in->hasFormat(Format_NHWC))
- {
- printNodeValidationError("OpAvgPool2d: unsupported tensor format");
- return 1;
- }
-
if (attribute->padding().size() != 4)
{
printNodeValidationError("OpAvgPool2d: illegal size for attribute padding");
@@ -321,28 +315,11 @@ int OpConv2d<InDtype, WeightDtype>::checkTensorAttributes()
printNodeValidationError("OpConv2d: bias tensor must be rank 1");
}
- if (inputs[1]->getIsConst() == 0)
- {
- printNodeValidationError("OpConv2d: weight tensor is not const typed");
- }
-
input = dynamic_cast<TosaReference::TensorTemplate<TIn>*>(inputs[0]);
weight = dynamic_cast<TosaReference::TensorTemplate<TWeight>*>(inputs[1]);
bias = dynamic_cast<TosaReference::TensorTemplate<TBias>*>(inputs[2]);
output = dynamic_cast<TosaReference::TensorTemplate<TAcc>*>(outputs[0]);
- if (!input->hasFormat(Format_NHWC))
- {
- printNodeValidationError("OpConv2d: unsupported input tensor format");
- return 1;
- }
-
- if (!weight->hasFormat(Format_OHWI))
- {
- printNodeValidationError("OpConv2d: unsupported weight tensor format");
- return 1;
- }
-
if (attribute->padding().size() != 4)
{
printNodeValidationError("OpConv2d: illegal size for attribute padding");
@@ -530,28 +507,11 @@ int OpDepthwiseConv2d<InDtype, WeightDtype>::checkTensorAttributes()
printNodeValidationError("OpDepthwiseConv2d: bias tensor must be rank 1");
}
- if (inputs[1]->getIsConst() == 0)
- {
- printNodeValidationError("OpDepthwiseConv2d: weight tensor is not const typed");
- }
-
input = dynamic_cast<TosaReference::TensorTemplate<TIn>*>(inputs[0]);
weight = dynamic_cast<TosaReference::TensorTemplate<TWeight>*>(inputs[1]);
bias = dynamic_cast<TosaReference::TensorTemplate<TBias>*>(inputs[2]);
output = dynamic_cast<TosaReference::TensorTemplate<TAcc>*>(outputs[0]);
- if (!input->hasFormat(Format_NHWC))
- {
- printNodeValidationError("OpDepthwiseConv2d: unsupported input tensor format");
- return 1;
- }
-
- if (!weight->hasFormat(Format_HWIM))
- {
- printNodeValidationError("OpDepthwiseConv2d: unsupported weight tensor format");
- return 1;
- }
-
if (attribute->padding().size() != 4)
{
printNodeValidationError("OpDepthwiseConv2d: illegal size for attribute padding");
@@ -881,12 +841,6 @@ int OpMaxPool2d<Dtype>::checkTensorAttributes()
in = dynamic_cast<TosaReference::TensorTemplate<TIn>*>(inputs[0]);
out = dynamic_cast<TosaReference::TensorTemplate<TOut>*>(outputs[0]);
- if (!in->hasFormat(Format_NHWC))
- {
- printNodeValidationError("OpMaxPool2d: unsupported tensor format");
- return 1;
- }
-
if (attribute->padding().size() != 4)
{
printNodeValidationError("OpMaxPool2d: illegal size for attribute padding");
@@ -1021,28 +975,11 @@ int OpTransposeConv2d<InDtype, OutDtype>::checkTensorAttributes()
return 1;
}
- if (inputs[1]->getIsConst() == 0)
- {
- printNodeValidationError("OpTransposeConv2d: weight tensor is not const typed");
- }
-
input = dynamic_cast<TosaReference::TensorTemplate<TIn>*>(inputs[0]);
weight = dynamic_cast<TosaReference::TensorTemplate<TWeight>*>(inputs[1]);
bias = dynamic_cast<TosaReference::TensorTemplate<TBias>*>(inputs[2]);
output = dynamic_cast<TosaReference::TensorTemplate<TAcc>*>(outputs[0]);
- if (!input->hasFormat(Format_NHWC))
- {
- printNodeValidationError("OpTransposeConv2d: unsupported input tensor format");
- return 1;
- }
-
- if (!weight->hasFormat(Format_OHWI))
- {
- printNodeValidationError("OpTransposeConv2d: unsupported weight tensor format");
- return 1;
- }
-
if (attribute->outpad().size() != 2)
{
printNodeValidationError("OpTransposeConv2d: illegal size for attribute outpad");