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
29e68f5f
Commit
29e68f5f
authored
Feb 28, 2018
by
Tianqi Chen
Committed by
GitHub
Feb 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compiler warnings (#939)
parent
07cc21f1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
src/codegen/spirv/ir_builder.cc
+2
-1
src/codegen/spirv/ir_builder.h
+1
-1
topi/include/topi/nn/softmax.h
+2
-2
No files found.
src/codegen/spirv/ir_builder.cc
View file @
29e68f5f
...
...
@@ -159,7 +159,8 @@ Value IRBuilder::FloatImm(const SType& dtype, double value) {
return
GetConst_
(
dtype
,
reinterpret_cast
<
uint64_t
*>
(
&
value
));
}
else
if
(
dtype
.
type
.
bits
()
==
32
)
{
float
fvalue
=
static_cast
<
float
>
(
value
);
uint64_t
data
=
reinterpret_cast
<
uint32_t
*>
(
&
fvalue
)[
0
];
uint32_t
*
ptr
=
reinterpret_cast
<
uint32_t
*>
(
&
fvalue
);
uint64_t
data
=
ptr
[
0
];
return
GetConst_
(
dtype
,
&
data
);
}
else
{
CHECK_EQ
(
dtype
.
type
.
bits
(),
16
);
...
...
src/codegen/spirv/ir_builder.h
View file @
29e68f5f
...
...
@@ -344,7 +344,7 @@ class IRBuilder {
* \tparams Args The positional arguments
*/
template
<
typename
...
Args
>
Value
DeclareGlobal
(
spv
::
Op
op
,
Args
&&
...
args
)
{
void
DeclareGlobal
(
spv
::
Op
op
,
Args
&&
...
args
)
{
ib_
.
Begin
(
op
).
AddSeq
(
std
::
forward
<
Args
>
(
args
)...).
Commit
(
&
decorate_
);
}
/*!
...
...
topi/include/topi/nn/softmax.h
View file @
29e68f5f
...
...
@@ -47,7 +47,7 @@ inline Tensor softmax(const Tensor &x,
Array
<
Expr
>
eval_range
;
int
arg_counter
=
0
;
for
(
size_t
i
=
0
;
i
<
ndim
;
++
i
)
{
if
(
i
==
axis
)
if
(
static_cast
<
int
>
(
i
)
==
axis
)
eval_range
.
push_back
(
reduce_index
);
else
eval_range
.
push_back
(
indices
[
arg_counter
++
]);
...
...
@@ -70,7 +70,7 @@ inline Tensor softmax(const Tensor &x,
const
Array
<
Var
>
&
indices
)
{
Array
<
Expr
>
non_reduce_indices
;
for
(
size_t
i
=
0
;
i
<
ndim
;
++
i
)
{
if
(
i
!=
axis
)
if
(
static_cast
<
int
>
(
i
)
!=
axis
)
non_reduce_indices
.
push_back
(
indices
[
i
]);
}
return
tvm
::
exp
(
x
(
indices
)
-
max_elem
(
non_reduce_indices
))
/
...
...
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