Skip to content

Dimension dismatch issue #1956

Closed Answered by maleadt
yuwenchen95 asked this question in Q&A
Discussion options

You must be logged in to vote

It's confusing that I am passing an array as the argument but it returns the error pointing to a vector type.

Vectors are arrays, that's not the source of the issue. The problem is that CuArrays get converted to CuDeviceArrays when passing them to kernels, so your ::CuMatrix type specification is wrong. It's better to be less specific, so if you use ::AbstractMatrix{T} it will apply to the CuDeviceMatrix that your array gets converted to.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yuwenchen95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants