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
9161efbc
Commit
9161efbc
authored
Aug 12, 2019
by
Neo Chien
Committed by
Tianqi Chen
Aug 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the potential index overflow (#3751)
parent
d6b7b62d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/relay/op/tensor/transform.cc
+4
-3
No files found.
src/relay/op/tensor/transform.cc
View file @
9161efbc
...
@@ -1451,9 +1451,10 @@ bool WhereRel(const Array<Type>& types,
...
@@ -1451,9 +1451,10 @@ bool WhereRel(const Array<Type>& types,
CHECK
(
reporter
->
AssertEQ
(
x_shape
[
i
],
y_shape
[
i
]))
CHECK
(
reporter
->
AssertEQ
(
x_shape
[
i
],
y_shape
[
i
]))
<<
"x and y must have the same shape: "
<<
x_shape
<<
" vs "
<<
y_shape
;
<<
"x and y must have the same shape: "
<<
x_shape
<<
" vs "
<<
y_shape
;
CHECK
(
reporter
->
AssertEQ
(
cond_shape
[
i
],
x_shape
[
i
]))
if
(
i
<
cond_shape
.
size
())
{
<<
"Shape of condition "
<<
condition
->
shape
CHECK
(
reporter
->
AssertEQ
(
cond_shape
[
i
],
x_shape
[
i
]))
<<
" must be either equal to x or has dimension of 1."
;
<<
"condition and x must have the same shape: "
<<
cond_shape
<<
" vs "
<<
x_shape
;
}
}
}
reporter
->
Assign
(
types
[
3
],
TensorTypeNode
::
make
(
x_shape
,
x
->
dtype
));
reporter
->
Assign
(
types
[
3
],
TensorTypeNode
::
make
(
x_shape
,
x
->
dtype
));
return
true
;
return
true
;
...
...
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