Skip to content
Snippets Groups Projects
Commit ba6d6d8b authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fix Coverage related issue

parent 3e720635
No related branches found
No related tags found
2 merge requests!54Update 0.3.1 -> 0.4.0,!36Global Quantization Improvements
Pipeline #65500 canceled
......@@ -182,7 +182,6 @@ endif()
# Coverage flags for GCC
if(CMAKE_COMPILER_IS_GNUCXX AND COVERAGE)
include(CodeCoverage)
append_coverage_compiler_flags()
endif()
......
......@@ -23,7 +23,7 @@ void FixedQImpl_cpu_forward_kernel(
std::size_t nbBits,
float span_,
bool isOutputUnsigned,
std::size_t inputLenght,
std::size_t inputLength,
const void* input_,
void* output_)
{
......@@ -40,7 +40,7 @@ void FixedQImpl_cpu_forward_kernel(
const I* input = static_cast<const I*>(input_);
O* output = static_cast<O*>(output_);
for (std::size_t i = 0; i < inputLenght; ++i) {
for (std::size_t i = 0; i < inputLength; ++i) {
I clipped = std::max(lower, std::min(input[i], upper));
output[i] = std::round(clipped / stepSize) * stepSize;
}
......@@ -49,14 +49,14 @@ void FixedQImpl_cpu_forward_kernel(
template <class GI, class GO>
void FixedQImpl_cpu_backward_kernel(
const std::size_t inputLenght,
const std::size_t inputLength,
const void* grad_output_,
void* grad_input_)
{
const GO* grad_output = static_cast<const GO*>(grad_output_);
GI* grad_input = static_cast<GI*>(grad_input_);
for (std::size_t i = 0; i < inputLenght; ++i) {
for (std::size_t i = 0; i < inputLength; ++i) {
// Straight Through Estimator
grad_input[i] = grad_output[i];
}
......
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