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
8eb3157a
Commit
8eb3157a
authored
5 years ago
by
Animesh Jain
Committed by
Tianqi Chen
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[QNN] Fix padding changes due to #3739 (#3989)
parent
cb1faf8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/relay/pass/pattern_util.h
+3
-1
src/relay/qnn/op/convolution.cc
+1
-1
No files found.
src/relay/pass/pattern_util.h
View file @
8eb3157a
...
...
@@ -476,10 +476,12 @@ static inline Expr AvgPool2D(Expr data, Array<IndexExpr> pool_size, Array<IndexE
return
CallNode
::
make
(
op
,
{
data
},
Attrs
(
attrs
),
{});
}
static
inline
Expr
Pad
(
Expr
data
,
Array
<
Array
<
IndexExpr
>>
pad_width
,
double
pad_value
)
{
static
inline
Expr
Pad
(
Expr
data
,
Array
<
Array
<
IndexExpr
>>
pad_width
,
double
pad_value
,
std
::
string
pad_mode
)
{
auto
attrs
=
make_node
<
PadAttrs
>
();
attrs
->
pad_value
=
pad_value
;
attrs
->
pad_width
=
std
::
move
(
pad_width
);
attrs
->
pad_mode
=
std
::
move
(
pad_mode
);
static
const
Op
&
op
=
Op
::
Get
(
"nn.pad"
);
return
CallNode
::
make
(
op
,
{
data
},
Attrs
(
attrs
),
{});
}
...
...
This diff is collapsed.
Click to expand it.
src/relay/qnn/op/convolution.cc
View file @
8eb3157a
...
...
@@ -167,7 +167,7 @@ Expr Conv2DPadInput(const Expr& data, const QnnConv2DAttrs* param) {
}
else
{
LOG
(
FATAL
)
<<
"qnn.conv2d does not support "
<<
param
->
data_layout
<<
" layout"
;
}
padded_data
=
Pad
(
data
,
pad_width
,
param
->
input_zero_point
);
padded_data
=
Pad
(
data
,
pad_width
,
param
->
input_zero_point
,
"constant"
);
}
return
padded_data
;
}
...
...
This diff is collapsed.
Click to expand it.
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