diff --git a/lib/Backends/Interpreter/InterpreterNodes.cpp b/lib/Backends/Interpreter/InterpreterNodes.cpp index a306c25930..2afb602bf0 100644 --- a/lib/Backends/Interpreter/InterpreterNodes.cpp +++ b/lib/Backends/Interpreter/InterpreterNodes.cpp @@ -1946,17 +1946,6 @@ void InterpreterFunction::fwdQuantizationProfileInst( quantization::generateTensorHistogram(inputTensor, currentHistogram, min, max); } -/* -template -static void fwdQuantize(Handle srcHandle, Tensor *destTensor) { - TensorQuantizationParams params{destTensor->getType().getScale(), - destTensor->getType().getOffset()}; - - auto destHandle = destTensor->getHandle(); - for (size_t i = 0, e = destHandle.size(); i < e; ++i) { - destHandle.raw(i) = quantization::quantize(srcHandle.raw(i), params); - } - }*/ /// Quantize floating point tensor. Scale and Offset are based on return type /// of the instruction \p I. @@ -1970,27 +1959,6 @@ void InterpreterFunction::fwdQuantizeInst(const glow::QuantizeInst *I) { destTensor->assign(&qTensor); } -/* -/// Quantize floating point tensor. Scale and Offset are based on return type -/// of the instruction \p I. -void InterpreterFunction::fwdQuantizeInst(const glow::QuantizeInst *I) { - auto *destTensor = getTensor(I->getDest()); - switch (I->getSrc()->getElementType()) { - case ElemKind::FloatTy: { - auto srcHandle = getWeightHandle(I->getSrc()); - fwdQuantize(srcHandle, destTensor); - return; - } - case ElemKind::Float16Ty: { - auto srcHandle = getWeightHandle(I->getSrc()); - fwdQuantize(srcHandle, destTensor); - return; - } - default: - llvm_unreachable("Type not supported"); - } - }*/ - template static void fwdDequantize(Tensor *srcTensor, Handle destHandle) { TensorQuantizationParams params{srcTensor->getType().getScale(),