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
5cb729ec
Commit
5cb729ec
authored
Dec 21, 2018
by
Haichen Shen
Committed by
Tianqi Chen
Dec 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUGFIX] Seg fault in memory planing for symbolic shape (#2317)
parent
97ca4031
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/relay/backend/graph_plan_memory.cc
+4
-4
No files found.
src/relay/backend/graph_plan_memory.cc
View file @
5cb729ec
...
...
@@ -196,7 +196,7 @@ class StorageAllocator : public StorageAllocaBaseVisitor {
protected
:
using
StorageAllocaBaseVisitor
::
VisitExpr_
;
// override create token by getting token as prototype requirements.
void
CreateToken
(
const
ExprNode
*
op
,
bool
can_realloc
)
final
{
void
CreateToken
(
const
ExprNode
*
op
,
bool
can_realloc
)
final
{
CHECK
(
!
token_map_
.
count
(
op
));
auto
it
=
prototype_
.
find
(
op
);
CHECK
(
it
!=
prototype_
.
end
());
...
...
@@ -253,12 +253,12 @@ class StorageAllocator : public StorageAllocaBaseVisitor {
size_t
size
=
1
;
for
(
IndexExpr
dim
:
ttype
->
shape
)
{
const
int64_t
*
pval
=
as_const_int
(
dim
);
CHECK_GE
(
*
pval
,
0
)
<<
"can not allocate memory for tensor with negative shape"
<<
*
pval
;
CHECK
(
pval
!=
nullptr
)
<<
"Cannot allocate memory symbolic tensor shape "
<<
ttype
->
shape
;
CHECK_GE
(
*
pval
,
0
)
<<
"Cannot allocate memory for tensor with negative shape"
<<
*
pval
;
size
*=
static_cast
<
size_t
>
(
pval
[
0
]);
}
size
*=
DivRoundUp
(
ttype
->
dtype
.
bits
()
*
ttype
->
dtype
.
lanes
(),
8
);
...
...
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