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

Bug in GEMV: result wrong dimension #97

Closed
chrism0dwk opened this issue Oct 23, 2017 · 3 comments
Closed

Bug in GEMV: result wrong dimension #97

chrism0dwk opened this issue Oct 23, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@chrism0dwk
Copy link

chrism0dwk commented Oct 23, 2017

I think I've discovered a critical bug in the GEMV implementation in gpuR version 2.0.0.

Example: multiply 3x2 matrix 'x' by a vector of length 2 'y':

> x = vclMatrix(matrix(1:6,ncol=2),type='float')
> y = vclVector(1:2, type='float')
> z = x%*%y
> z[]
[1]  9 12

The result 'z' is of length length(y), rather than nrow(x).

If I change the dimensions of the data structures such that 'x' is 3x2 and 'y' is length 3:

> x = vclMatrix(matrix(1:6,ncol=3),type='float')
> y = vclVector(1:3, type='float')
> z = x%*%y
> z[]
[1] 22 28 0

Again, the result is of length(y), not nrow(x).

Cheers,

Chris

System spec

R version 3.4.1
gpuR version 2.0.0 (CRAN)
CentOS 7.5
CUDA 9.0 with NVIDIA Quadro GP100 card.

@cdeterman cdeterman added the bug label Oct 23, 2017
@cdeterman cdeterman self-assigned this Oct 23, 2017
@cdeterman cdeterman added this to the 2.1.0 milestone Oct 23, 2017
@cdeterman
Copy link
Owner

Thank you for reporting. I completely forgot my unit tests for gemv and this is what I get. I will commit a bug fix shortly.

@chrism0dwk
Copy link
Author

Many thanks for fixing this so quickly! A great help to my research :)

Chris

@cdeterman
Copy link
Owner

No problem, in this case it was an easy fix that you pointed out. Please let me know if you encounter any other issues. Glad the package is useful to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants