Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AUTOTVM] tweak sample_int implementation #2677

Merged
merged 4 commits into from
Feb 28, 2019
Merged

Conversation

eqy
Copy link
Contributor

@eqy eqy commented Feb 27, 2019

sample_int seems to have issues with high-low > 2^32, even in Python 3. Switching to random seems to work.

CC @merrymercy

@eqy eqy requested a review from merrymercy February 27, 2019 00:46
@@ -58,10 +60,11 @@ def sample_ints(low, high, m):
"""
vis = set()
assert m <= high - low
print("hi fam")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, oops

@@ -40,7 +42,7 @@ def get_rank(values):
def sample_ints(low, high, m):
"""
Sample m different integer numbers from [low, high) without replacement
This function is an alternative of `np.random.choice` when (high - low) > 2 ^ 32, in
This function is an alternative of `np.random.choice` when (high - low) > 2 ^ 64, in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to modify this line., because the np.random.choice does not work when (high - low) > 2^32, and this comment still holds.

@merrymercy merrymercy merged commit ddc31fd into apache:master Feb 28, 2019
bwasti pushed a commit to facebookexperimental/tvm that referenced this pull request Mar 6, 2019
* check in

* lint

* cleanup

* Update util.py
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 9, 2019
* check in

* lint

* cleanup

* Update util.py
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 12, 2019
* check in

* lint

* cleanup

* Update util.py
wweic pushed a commit to neo-ai/tvm that referenced this pull request Mar 12, 2019
* check in

* lint

* cleanup

* Update util.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants