diff --git a/include/tim/experimental/trace/README.md b/include/tim/experimental/trace/README.md index dd25bbe..8830e31 100755 --- a/include/tim/experimental/trace/README.md +++ b/include/tim/experimental/trace/README.md @@ -35,7 +35,7 @@ struct TensorSpec { TensorSpec& SetDataType(DataType datatype); - TensorSpec& SetShape(ShapeType& shape); + TensorSpec& SetShape(const ShapeType& shape); TensorSpec& SetAttribute(TensorAttribute attr); ... diff --git a/include/tim/vx/tensor.h b/include/tim/vx/tensor.h index 4e4b236..0d26d7a 100644 --- a/include/tim/vx/tensor.h +++ b/include/tim/vx/tensor.h @@ -106,7 +106,7 @@ struct TensorSpec { TensorSpec& SetDataType(DataType datatype); - TensorSpec& SetShape(ShapeType& shape); + TensorSpec& SetShape(const ShapeType& shape); TensorSpec& SetAttribute(TensorAttribute attr); diff --git a/include/tim/vx/types.h b/include/tim/vx/types.h index 432ff1c..7418fd4 100644 --- a/include/tim/vx/types.h +++ b/include/tim/vx/types.h @@ -29,8 +29,6 @@ namespace vx { enum class DataType { UNKNOWN, - INT4, - UINT4, INT8, UINT8, INT16, @@ -40,7 +38,9 @@ enum class DataType { INT64, FLOAT16, FLOAT32, - BOOL8 + BOOL8, + INT4, + UINT4 }; enum class QuantType { NONE, ASYMMETRIC, SYMMETRIC_PER_CHANNEL, DYNAMIC_FIXED_POINT }; diff --git a/src/tim/vx/tensor.cc b/src/tim/vx/tensor.cc index 3fcd246..e424843 100644 --- a/src/tim/vx/tensor.cc +++ b/src/tim/vx/tensor.cc @@ -401,7 +401,7 @@ TensorSpec& TensorSpec::SetDataType(DataType datatype) { return *this; } -TensorSpec& TensorSpec::SetShape(ShapeType& shape) { +TensorSpec& TensorSpec::SetShape(const ShapeType& shape) { this->shape_ = shape; return *this; }