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
7afe6ba8
Commit
7afe6ba8
authored
Aug 23, 2018
by
Lianmin Zheng
Committed by
Tianqi Chen
Aug 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix CO CI problem (#1641)
parent
56ab0adb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tutorials/autotvm/tune_conv2d_cuda.py
+3
-3
No files found.
tutorials/autotvm/tune_conv2d_cuda.py
View file @
7afe6ba8
...
@@ -64,7 +64,7 @@ from tvm import autotvm
...
@@ -64,7 +64,7 @@ from tvm import autotvm
#
#
@autotvm.template
@autotvm.template
def
conv2d_no_batching
(
N
,
H
,
W
,
C
I
,
CO
,
KH
,
KW
,
stride
,
padding
):
def
conv2d_no_batching
(
N
,
H
,
W
,
C
O
,
CI
,
KH
,
KW
,
stride
,
padding
):
assert
N
==
1
,
"Only consider batch_size = 1 in this template"
assert
N
==
1
,
"Only consider batch_size = 1 in this template"
data
=
tvm
.
placeholder
((
N
,
CI
,
H
,
W
),
name
=
'data'
)
data
=
tvm
.
placeholder
((
N
,
CI
,
H
,
W
),
name
=
'data'
)
...
@@ -206,8 +206,8 @@ func(a_tvm, w_tvm, c_tvm)
...
@@ -206,8 +206,8 @@ func(a_tvm, w_tvm, c_tvm)
np
.
testing
.
assert_allclose
(
c_np
,
c_tvm
.
asnumpy
(),
rtol
=
1e-2
)
np
.
testing
.
assert_allclose
(
c_np
,
c_tvm
.
asnumpy
(),
rtol
=
1e-2
)
# Evaluate running time. Here we choose a large repeat number (
2
00) to reduce the noise
# Evaluate running time. Here we choose a large repeat number (
4
00) to reduce the noise
# and the overhead of kernel launch. You can also use nvprof to validate the result.
# and the overhead of kernel launch. You can also use nvprof to validate the result.
evaluator
=
func
.
time_evaluator
(
func
.
entry_name
,
ctx
,
number
=
2
00
)
evaluator
=
func
.
time_evaluator
(
func
.
entry_name
,
ctx
,
number
=
4
00
)
print
(
'Time cost of this operator:
%
f'
%
evaluator
(
a_tvm
,
w_tvm
,
c_tvm
)
.
mean
)
print
(
'Time cost of this operator:
%
f'
%
evaluator
(
a_tvm
,
w_tvm
,
c_tvm
)
.
mean
)
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