Skip to content

softmax kernel #106

New issue

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

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

Already on GitHub? # to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

softmax kernel #106

wants to merge 1 commit into from

Conversation

SimonDanisch
Copy link
Member

No description provided.

@SimonDanisch SimonDanisch mentioned this pull request Feb 26, 2018
@DilumAluthge
Copy link

@SimonDanisch @MikeInnes What was the conclusion regarding this PR?

@jekbradbury
Copy link

I have a working, reasonably fast, but not very generic CUDA softmax in https://github.com/jekbradbury/Transformer.jl/blob/master/src/kernels.jl

@DilumAluthge
Copy link

DilumAluthge commented Jul 17, 2018 via email

@SimonDanisch
Copy link
Member Author

I wonder if it would be easier to port James’s kernel to OpenCL versus

We can just port it to julia in a way that it works with both CLArrays + CuArrays.

I already took a look at it - the only thing holding us back is, that @jekbradbury used dynamic shared memory, that behaves a bit peculiar compared to the CuStaticSharedMem (which is also supported by CLArrays, when you use the GPUArray version). I had a stab at supporting dynamic shared memory in GPUArrays vendor independently, but couldn't implement it in the time frame I set myself... In theory it's quite straightforward and I should make a PR out of what I had ;)

@jekbradbury
Copy link

I don't know if there's any particular reason Marian-NMT used dynamic shared memory for this rather than static. (Also, this kernel contains a reasonably fast mapreducedim implementation for reductions over the inner dim, so it would be useful to include that separately if someone works on porting)

@maleadt maleadt force-pushed the master branch 4 times, most recently from 39e7783 to fef2421 Compare December 11, 2018 15:49
@maleadt maleadt changed the title stab at softmax kernel WIP: softmax kernel Feb 23, 2019
@maleadt maleadt marked this pull request as draft May 8, 2020 10:39
@maleadt maleadt changed the title WIP: softmax kernel softmax kernel May 8, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants