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
ddc31fd4
Commit
ddc31fd4
authored
Feb 27, 2019
by
eqy
Committed by
Lianmin Zheng
Feb 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AUTOTVM] tweak `sample_int` implementation (#2677)
* check in * lint * cleanup * Update util.py
parent
bd780795
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
python/tvm/autotvm/util.py
+4
-2
No files found.
python/tvm/autotvm/util.py
View file @
ddc31fd4
...
...
@@ -4,6 +4,8 @@ import logging
import
multiprocessing
import
time
from
random
import
randrange
import
numpy
as
np
from
..
import
expr
,
ir_pass
...
...
@@ -59,9 +61,9 @@ def sample_ints(low, high, m):
vis
=
set
()
assert
m
<=
high
-
low
while
len
(
vis
)
<
m
:
new
=
np
.
random
.
randint
(
low
,
high
)
new
=
randrange
(
low
,
high
)
while
new
in
vis
:
new
=
np
.
random
.
randint
(
low
,
high
)
new
=
randrange
(
low
,
high
)
vis
.
add
(
new
)
return
list
(
vis
)
...
...
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