aboutsummaryrefslogtreecommitdiff
path: root/verif/tosa_serializer.py
diff options
context:
space:
mode:
authorKevin Cheng <kevin.cheng@arm.com>2021-05-12 10:44:49 -0700
committerKevin Cheng <kevin.cheng@arm.com>2021-05-12 14:51:16 -0700
commit14d7f7a2b5d0d85b83d8c84a5456828feb1a0ea1 (patch)
treec0e5eaa7e119d7998f5780a6c90947e875eddf84 /verif/tosa_serializer.py
parentd267dd9418374d49ac1e1a1a9c9b1d30b5733ee9 (diff)
downloadreference_model-14d7f7a2b5d0d85b83d8c84a5456828feb1a0ea1.tar.gz
Update to v0.22.0
- remove identityN and placeholder - add div - update serialization_lib hash - update apply_scale_16() assertion - regenerate examples/ due to serialization_lib change Change-Id: I7183d92bec33697c65adfc07cb8eb89c6882675a
Diffstat (limited to 'verif/tosa_serializer.py')
-rw-r--r--verif/tosa_serializer.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/verif/tosa_serializer.py b/verif/tosa_serializer.py
index 726ffc4..5ed9877 100644
--- a/verif/tosa_serializer.py
+++ b/verif/tosa_serializer.py
@@ -548,8 +548,6 @@ class TosaSerializer:
tens = self.currBasicBlock.addTensor(name, shape, dtype, None, filename)
# This is always an input to the block
self.currBasicBlock.addInput(name)
- # Add the operator now
- self.currBasicBlock.addOperator(tosa.Op.Op().PLACEHOLDER, [], name)
if vals is not None:
np.save(os.path.join(self.pathPrefix, filename), vals, False)
@@ -586,7 +584,6 @@ class TosaSerializer:
return tens
def addInputTensor(self, tensor):
- self.currBasicBlock.addOperator(tosa.Op.Op().PLACEHOLDER, [], tensor.name)
self.currBasicBlock.addTensor(tensor.name, tensor.shape, tensor.dtype)
self.currBasicBlock.addInput(tensor.name)
@@ -606,10 +603,8 @@ class TosaSerializer:
def addOperator(self, op, inputs, outputs, attributes=None, quant_info=None):
- if op == tosa.Op.Op().PLACEHOLDER or op == tosa.Op.Op().CONST:
- raise Exception(
- "Use addPlaceholderTensor() or addConstTensor() to add PLACEHOLDER and CONST ops"
- )
+ if op == tosa.Op.Op().CONST:
+ raise Exception("Use addConstTensor() to add CONST ops")
return self.currBasicBlock.addOperator(
op, inputs, outputs, attributes, quant_info