Skip to content

Commit b7fd0c1

Browse files
alankellyxnnpack-bot
authored andcommitted
Fix vcmul microkernel tester
The tester was using `nanf("")` to initialize the output buffer, but this is not a valid `NaN` value for uint16_t. This CL changes the tester to use `UINT16_C(0x7E00)`, which is a valid `NaN` value for `fp16`. PiperOrigin-RevId: 634416194
1 parent 9d12551 commit b7fd0c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/vcmul-microkernel-tester.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class VCMulMicrokernelTester {
8282
} else if (inplace_b()) {
8383
std::copy(b.cbegin(), b.cend(), y.begin());
8484
} else {
85-
std::fill(y.begin(), y.end(), nanf(""));
85+
std::fill(y.begin(), y.end(), UINT16_C(0x7E00) /* NaN */);
8686
}
8787
const uint16_t* a_data = inplace_a() ? y.data() : a.data();
8888
const uint16_t* b_data = inplace_b() ? y.data() : b.data();

0 commit comments

Comments
 (0)