Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions nnvm/include/nnvm/top/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,14 @@ enum TypeFlag {
kInt32 = 4,
kInt8 = 5,
kInt64 = 6,
kInt16 = 7,
kUint16 = 8,
kUint32 = 9,
kUint64 = 10,
// kBool = 7,
// 7 is reserved for kBool, in order to keep consistency with MXNet TypeFlag defined in
// https://github.com/apache/incubator-mxnet/blob/master/3rdparty/mshadow/mshadow/base.h#L314
kInt16 = 8,
kUint16 = 9,
kUint32 = 10,
kUint64 = 11,
kBfloat16 = 12,
};

enum IndicatorRuleFlag {
Expand All @@ -126,7 +130,8 @@ enum IndicatorRuleFlag {
.add_enum("int8", kInt8) \
.add_enum("int16", kInt16) \
.add_enum("int32", kInt32) \
.add_enum("int64", kInt64)
.add_enum("int64", kInt64) \
.add_enum("bfloat16", kBfloat16)

struct CastParam : public dmlc::Parameter<CastParam> {
int dtype;
Expand Down
1 change: 1 addition & 0 deletions nnvm/src/pass/plan_memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ static int GetDTypeSize(int type_flag) {
case kInt8:
return 1;
case kFloat16:
case kBfloat16:
case kInt16:
case kUint16:
return 2;
Expand Down