Skip to content

[Clean up] Clean up the unused code. #1929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions lib/Backends/Interpreter/InterpreterNodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1946,17 +1946,6 @@ void InterpreterFunction::fwdQuantizationProfileInst(
quantization::generateTensorHistogram(inputTensor, currentHistogram, min,
max);
}
/*
template <typename ElemTy>
static void fwdQuantize(Handle<ElemTy> srcHandle, Tensor *destTensor) {
TensorQuantizationParams params{destTensor->getType().getScale(),
destTensor->getType().getOffset()};

auto destHandle = destTensor->getHandle<int8_t>();
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.
Expand All @@ -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<float>(I->getSrc());
fwdQuantize(srcHandle, destTensor);
return;
}
case ElemKind::Float16Ty: {
auto srcHandle = getWeightHandle<float16>(I->getSrc());
fwdQuantize(srcHandle, destTensor);
return;
}
default:
llvm_unreachable("Type not supported");
}
}*/

template <typename ElemTy>
static void fwdDequantize(Tensor *srcTensor, Handle<ElemTy> destHandle) {
TensorQuantizationParams params{srcTensor->getType().getScale(),
Expand Down