Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
8541e255
Commit
8541e255
authored
Dec 16, 2019
by
YixinBao
Committed by
Tianqi Chen
Dec 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bfloat16 typeflag support (#4525)
parent
62aac9f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
nnvm/include/nnvm/top/tensor.h
+10
-5
nnvm/src/pass/plan_memory.cc
+1
-0
No files found.
nnvm/include/nnvm/top/tensor.h
View file @
8541e255
...
...
@@ -100,10 +100,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
{
...
...
@@ -125,7 +129,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
;
...
...
nnvm/src/pass/plan_memory.cc
View file @
8541e255
...
...
@@ -40,6 +40,7 @@ static int GetDTypeSize(int type_flag) {
case
kInt8
:
return
1
;
case
kFloat16
:
case
kBfloat16
:
case
kInt16
:
case
kUint16
:
return
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment