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

Hi, is there any faster gpu-version? #2

Open
happygds opened this issue Jul 9, 2018 · 2 comments
Open

Hi, is there any faster gpu-version? #2

happygds opened this issue Jul 9, 2018 · 2 comments

Comments

@happygds
Copy link

happygds commented Jul 9, 2018

Hi, I find it was too slow when I ran the code, is there any faster gpu-version ?

@vene
Copy link
Owner

vene commented Jul 9, 2018

Hi,

We did use the GPU in our experiments. The SparseMAP layer itself cannot run on the GPU because it relies on external C++ code. What I recommend is: (i) Run the first part of your model on GPU. (ii) copy the potentials to CPU. (iii) Run SparseMAP on CPU. (iv) copy back and finish. This worked well for us and-- in the case of ESIM-- with minimal slowdown.

Hope this helps!

@PkuRainBow
Copy link

PkuRainBow commented Jul 16, 2018

@vene Really interesting. I am also wondering whether your sparse-attention support 4D tensors input like a mini-batch of images.

If the code can not run on GPU, it can become super-slow for image processing.......

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

No branches or pull requests

3 participants