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

Inconsistent pow and atan2 implementation of matrix functions for GPU and CPU #79

Open
winstrom opened this issue Jul 28, 2017 · 1 comment

Comments

@winstrom
Copy link

Hi,

I'm running into issues using the pow and atan2 functions on GPU and CPU matrices. The issue is really that the math works on the CPU and doesn't on the GPU. The following snippet works:

val m = rand(10,10)
val p = zeros(10,10) + 2
val buff = ones(10,10)
pow(m,p,buff)

And the similar GPU implementation hangs forever:

val m = grand(10,10)
val p = gzeros(10,10) + 2
val buff = gones(10,10)
pow(m,p,buff)

This is easy enough to work around with e.g.

exp(p *@ ln(m))

but was somewhat confusing when code that ran fine on a cpu hung forever on a GPU.

@winstrom
Copy link
Author

I see that the ^ operator is now available for matrices which is a nicer way to use the power function.

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

1 participant