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
46f141f2
Commit
46f141f2
authored
Aug 26, 2017
by
ziheng
Committed by
GitHub
Aug 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NNPack] Fix automatically cast fail on some platforms (#388)
parent
26b433b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
src/contrib/nnpack/convolution.cc
+6
-3
src/contrib/nnpack/nnpack_utils.cc
+1
-1
No files found.
src/contrib/nnpack/convolution.cc
View file @
46f141f2
...
...
@@ -20,8 +20,10 @@ TVM_REGISTER_GLOBAL("tvm.contrib.nnpack.convolution_inference")
DLTensor
*
kernel
=
args
[
1
];
DLTensor
*
bias
=
args
[
2
];
DLTensor
*
output
=
args
[
3
];
nnp_padding
input_padding
{
args
[
4
],
args
[
5
],
args
[
6
],
args
[
7
]};
nnp_size
stride_size
{
args
[
8
],
args
[
9
]};
uint64_t
pad_top
=
args
[
4
],
pad_right
=
args
[
5
],
pad_bottom
=
args
[
6
],
pad_left
=
args
[
7
];
nnp_padding
input_padding
{
pad_top
,
pad_right
,
pad_bottom
,
pad_left
};
uint64_t
stride_width
=
args
[
8
],
stride_height
=
args
[
9
];
nnp_size
stride_size
{
stride_width
,
stride_height
};
CHECK_EQ
(
input
->
ndim
,
3
);
CHECK_EQ
(
kernel
->
ndim
,
4
);
...
...
@@ -76,7 +78,8 @@ TVM_REGISTER_GLOBAL("tvm.contrib.nnpack.convolution_output")
DLTensor
*
kernel
=
args
[
1
];
DLTensor
*
bias
=
args
[
2
];
DLTensor
*
output
=
args
[
3
];
nnp_padding
input_padding
{
args
[
4
],
args
[
5
],
args
[
6
],
args
[
7
]};
uint64_t
pad_top
=
args
[
4
],
pad_right
=
args
[
5
],
pad_bottom
=
args
[
6
],
pad_left
=
args
[
7
];
nnp_padding
input_padding
{
pad_top
,
pad_right
,
pad_bottom
,
pad_left
};
CHECK_EQ
(
input
->
ndim
,
4
);
CHECK_EQ
(
kernel
->
ndim
,
4
);
...
...
src/contrib/nnpack/nnpack_utils.cc
View file @
46f141f2
...
...
@@ -17,7 +17,7 @@ NNPackThreadLocalEntry* NNPackThreadLocalEntry::ThreadLocal() {
TVM_REGISTER_GLOBAL
(
"contrib.nnpack._Config"
)
.
set_body
([](
TVMArgs
args
,
TVMRetValue
*
ret
)
{
NNPackThreadLocalEntry
*
entry
=
NNPackThreadLocalEntry
::
ThreadLocal
();
size_t
nthreads
=
args
[
0
];
size_t
nthreads
=
args
[
0
]
.
operator
uint64_t
()
;
if
(
entry
->
threadpool
!=
NULL
&&
pthreadpool_get_threads_count
(
entry
->
threadpool
)
!=
nthreads
)
{
pthreadpool_destroy
(
entry
->
threadpool
);
...
...
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