Skip to content

Commit dd13175

Browse files
EAddariocompilade
andauthored
Fix unnecessary type promotion
Co-authored-by: compilade <[email protected]>
1 parent b1c481a commit dd13175

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/imatrix/imatrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static void compute_statistics(std::vector<tensor_statistics> & tstats, const st
143143
const float act_dev = std::sqrt(std::max(0.0f, act_var));
144144
float threshold = 1e-5f;
145145
const int inactive_count = std::count_if(activations.begin(), activations.end(),
146-
[threshold](const float v) { return fabs(v) <= threshold; });
146+
[threshold](const float v) { return fabsf(v) <= threshold; });
147147
const float active_ratio = 1 - static_cast<float>(inactive_count) / activations.size();
148148

149149
float entropy = 0;

0 commit comments

Comments
 (0)