PawelGlomski-Intel commented on a change in pull request #20753:
URL: https://github.com/apache/incubator-mxnet/pull/20753#discussion_r828410608
##########
File path: src/serialization/cnpy.cc
##########
@@ -109,7 +109,7 @@ std::string dtype_descr(const TBlob& blob) {
case mshadow::kUint64:
return "'" MXNET_BYTEORDER "u8'";
case mshadow::kBfloat16:
- return "[('bfloat16', '" MXNET_BYTEORDER "u2')]";
+ return "'" MXNET_BYTEORDER "bfloat16'";
Review comment:
It cannot be `bf2` since it includes `f2`. `f2` is already used by
`float16`. Function `dtype_descr` (line 120) is checking whether the dtype name
has a substring matching the dtype abbreviation, so when one dtype include some
other dtype in its abbreviation, the ordering of if statements will matter -
`float16` will match `bf2` since it includes `f2` and `float16` is checked
first. We could move the `bfloat16` to be the first one, but I don't think this
is a good solution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]