aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/numpy_utils.h2
-rw-r--r--python/serializer/tosa_serializer.py8
2 files changed, 8 insertions, 2 deletions
diff --git a/include/numpy_utils.h b/include/numpy_utils.h
index a788f81..60cf77e 100644
--- a/include/numpy_utils.h
+++ b/include/numpy_utils.h
@@ -114,7 +114,7 @@ public:
template <typename D, typename S>
static void copyBufferByElement(D* dest_buf, S* src_buf, int num)
{
- static_assert(sizeof(D) >= sizeof(S));
+ static_assert(sizeof(D) >= sizeof(S), "The size of dest_buf must be equal to or larger than that of src_buf");
for (int i = 0; i < num; ++i)
{
dest_buf[i] = src_buf[i];
diff --git a/python/serializer/tosa_serializer.py b/python/serializer/tosa_serializer.py
index cd31624..1f6d26e 100644
--- a/python/serializer/tosa_serializer.py
+++ b/python/serializer/tosa_serializer.py
@@ -711,7 +711,13 @@ class TosaSerializerRegion:
return tens
def addInputTensor(self, tensor):
- self.currBasicBlock.addTensor(tensor.name, tensor.shape, tensor.dtype, tensor.data, tensor.placeholderFilename)
+ self.currBasicBlock.addTensor(
+ tensor.name,
+ tensor.shape,
+ tensor.dtype,
+ tensor.data,
+ tensor.placeholderFilename,
+ )
self.currBasicBlock.addInput(tensor.name)
def addOutputTensor(self, tensor):