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
34c636d9
Commit
34c636d9
authored
Nov 24, 2019
by
Philip Hyunsu Cho
Committed by
Tianqi Chen
Nov 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilaton of bfloat16 on Windows (#4415)
parent
2f1685fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
3rdparty/bfloat16/bfloat16.cc
+7
-3
No files found.
3rdparty/bfloat16/bfloat16.cc
View file @
34c636d9
...
@@ -60,19 +60,23 @@ void BFloat16Add(const uint16_t* a, const uint16_t* b, uint16_t* dst,
...
@@ -60,19 +60,23 @@ void BFloat16Add(const uint16_t* a, const uint16_t* b, uint16_t* dst,
}
}
extern
"C"
{
extern
"C"
{
TVM_DLL
TVM_DLL
uint16_t
FloatToBFloat16_wrapper
(
float
in
)
{
TVM_DLL
uint16_t
FloatToBFloat16_wrapper
(
float
in
);
TVM_DLL
float
BFloat16ToFloat_wrapper
(
uint16_t
in
);
TVM_DLL
uint16_t
BFloat16Add_wrapper
(
uint16_t
a
,
uint16_t
b
);
uint16_t
FloatToBFloat16_wrapper
(
float
in
)
{
uint16_t
out
;
uint16_t
out
;
FloatToBFloat16
(
&
in
,
&
out
,
1
);
FloatToBFloat16
(
&
in
,
&
out
,
1
);
return
out
;
return
out
;
}
}
TVM_DLL
float
BFloat16ToFloat_wrapper
(
uint16_t
in
)
{
float
BFloat16ToFloat_wrapper
(
uint16_t
in
)
{
float
out
;
float
out
;
BFloat16ToFloat
(
&
in
,
&
out
,
1
);
BFloat16ToFloat
(
&
in
,
&
out
,
1
);
return
out
;
return
out
;
}
}
TVM_DLL
uint16_t
BFloat16Add_wrapper
(
uint16_t
a
,
uint16_t
b
)
{
uint16_t
BFloat16Add_wrapper
(
uint16_t
a
,
uint16_t
b
)
{
uint16_t
out
;
uint16_t
out
;
BFloat16Add
(
&
a
,
&
b
,
&
out
,
1
);
BFloat16Add
(
&
a
,
&
b
,
&
out
,
1
);
return
out
;
return
out
;
...
...
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