Skip to content
Snippets Groups Projects
Commit 9fd586b0 authored by Maxence Naud's avatar Maxence Naud
Browse files

Merge branch 'deprecated_scaling_nodes' into 'dev'

Deprecate Scaling Node

See merge request !274
parents e7869ad3 966e274b
No related branches found
No related tags found
2 merge requests!279v0.4.0,!274Deprecate Scaling Node
Pipeline #60874 passed
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
#include "aidge/utils/StaticAttributes.hpp" #include "aidge/utils/StaticAttributes.hpp"
#include "aidge/utils/Types.h" #include "aidge/utils/Types.h"
//Caution: This operator is now deprecated and should no longer be used.
//It has been replaced by the MetaOperator "Quantizer" (located directly in aidge_quantization).
namespace Aidge { namespace Aidge {
enum class ScalingAttr { enum class ScalingAttr {
ScalingFactor, QuantizedNbBits, IsOutputUnsigned ScalingFactor, QuantizedNbBits, IsOutputUnsigned
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
#include "aidge/utils/Registrar.hpp" #include "aidge/utils/Registrar.hpp"
#include "aidge/utils/Types.h" #include "aidge/utils/Types.h"
//Caution: This operator is now deprecated and should no longer be used.
//It has been replaced by the MetaOperator "Quantizer" (located directly in aidge_quantization).
const std::string Aidge::Scaling_Op::Type = "Scaling"; const std::string Aidge::Scaling_Op::Type = "Scaling";
Aidge::Scaling_Op::Scaling_Op(float scalingFactor, std::size_t nbBits, bool isOutputUnsigned) Aidge::Scaling_Op::Scaling_Op(float scalingFactor, std::size_t nbBits, bool isOutputUnsigned)
...@@ -26,12 +30,15 @@ Aidge::Scaling_Op::Scaling_Op(float scalingFactor, std::size_t nbBits, bool isOu ...@@ -26,12 +30,15 @@ Aidge::Scaling_Op::Scaling_Op(float scalingFactor, std::size_t nbBits, bool isOu
attr<ScalingAttr::ScalingFactor>(scalingFactor), attr<ScalingAttr::ScalingFactor>(scalingFactor),
attr<ScalingAttr::QuantizedNbBits>(nbBits), attr<ScalingAttr::QuantizedNbBits>(nbBits),
attr<ScalingAttr::IsOutputUnsigned>(isOutputUnsigned))) attr<ScalingAttr::IsOutputUnsigned>(isOutputUnsigned)))
{} {
Log::warn("Caution: The [Scaling] operator is now deprecated and should no longer be used.\nIt has been replaced by the MetaOperator [Quantizer] (located directly in aidge_quantization).");
}
Aidge::Scaling_Op::Scaling_Op(const Aidge::Scaling_Op& op) Aidge::Scaling_Op::Scaling_Op(const Aidge::Scaling_Op& op)
: OperatorTensor(op), : OperatorTensor(op),
mAttributes(op.mAttributes) mAttributes(op.mAttributes)
{ {
Log::warn("Caution: The [Scaling] operator is now deprecated and should no longer be used. \nIt has been replaced by the MetaOperator [Quantizer] (located directly in aidge_quantization).");
if (op.mImpl){ if (op.mImpl){
SET_IMPL_MACRO(Scaling_Op, *this, op.backend()); SET_IMPL_MACRO(Scaling_Op, *this, op.backend());
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment