-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
fix onehot gpu #1441
fix onehot gpu #1441
Conversation
|
||
onecold(y::AbstractMatrix, labels...) = | ||
dropdims(mapslices(y -> onecold(y, labels...), y, dims=1), dims=1) | ||
onecold(y::AbstractMatrix, labels = 1:size(y,1)) = |
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.
Why remove the splatted version?
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.
because previously the default arg was handled by the specialization on AbstractVector, now it has to be handled here
#764 fixed the performance IIRC, that issue should be closed |
it didn't, as you can see from the benchmark I posted |
025a577
to
d8c85bf
Compare
closing in favor of #1447 |
Fix #556, fix #582, using a GPU friendly reduction.
Benchmarked with the following script (
onecold2
is the new version)