-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[random] support random fill #5913
Conversation
see comments, we don't need to expose the(non_empty) function as a primitive function, given that it is not a numpy function, and is only used in AutoTVM, instead we can achieve the same goal by x = nd.empty(..)
random_fill = get_packed_func("contrib.random.random_fill")
random_fill(x) Notably, the above solution is better because:
|
I agree with TQ's point. Also, I am a bit concerned if we really need a C API for this. |
I will handle it as comments |
@FrozenGene please followup |
Thanks for reminding. I want to complete the clflush pr and model based runtime pr, then handle this pr. Could you help to handle model based runtime pr now?
|
@tqchen I restart this work. This way we could make the random initialization on the device (i.e. |
@FrozenGene Please followup. It is okay to do the path |
Ping |
@merrymercy Our current method is we will introduce one @tqchen 's suggestion we could leverage I will follow up my pr that move our implementation to the |
de37081
to
696fdd9
Compare
@merrymercy @tqchen I have updated the code and verified it in the remote cpu / remote mali gpu. We could do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
So we will hava a later pr to add clflush
& random_fill
to AutoTVM & Auto_Scheduler?
Yes. |
@tqchen @merrymercy gental ping. Code has been updated. |
@tqchen @merrymercy @comaniac do you have other comments? |
Thanks @FrozenGene @comaniac @merrymercy |
@FrozenGene Can you send the follow-up PRs to enable this in ansor and autotvm? |
Thanks for reminding @merrymercy. My agenda is completely full tomorrow and weekend. I could do this next week. |
This pr support us to allocate non empty values of nd array, which could solve the issue of autotvm measurement is not correct (see #5200). This is one standalone part of Ansor (#5883).
@kevinthesun @merrymercy @minminsun @jcf94