Skip to content

Commit 960d0d4

Browse files
committed
hide ev rounding mpy/shift info in common print out
1 parent 95260a8 commit 960d0d4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/caffe/layers/conv_layer.ev.inc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ void Multiply_better(const int n, Dtype* x, const int mul, const int shift,
169169
(printf("Unrecognized rounding mode %s\n",QR), R_double_round);
170170
};
171171
static const Rmode QR = tell();
172+
172173
static bool show_data_bool = getenv("CAFFE_SHOW_DATA") != 0;
173174
auto show_data = [&](const char *when) {
174175
printf("Data %s\n",when);
@@ -177,6 +178,7 @@ void Multiply_better(const int n, Dtype* x, const int mul, const int shift,
177178
}
178179
return 0;
179180
};
181+
180182
switch (QR) {
181183
case R_double_round: {
182184
MultiplyByQuantizedMultiplierVR(n, x, mul, shift, round_mode);
@@ -190,7 +192,8 @@ void Multiply_better(const int n, Dtype* x, const int mul, const int shift,
190192
// Produces 15-bit mantissa and an exponent. The mantissa is
191193
// thus less precise than that of a 32-bit floating-point number.
192194
normalize_fractional(scale, mpy, shift);
193-
printf(" Layer %s: round mode %d by %18.15f = mpy %d shift %d\n",
195+
if (show_data_bool)
196+
printf(" Layer %s: round mode %d by %18.15f = mpy %d shift %d\n",
194197
name.c_str(), QR, scale, mpy, shift);
195198
typedef signed long long SLL;
196199
if (show_data_bool)

0 commit comments

Comments
 (0)