Skip to content

Fix isblasmatrix for GPU StridedViews - #96

Open
kshyatt wants to merge 4 commits into
mainfrom
ksh/gpu_ibm
Open

kshyatt wants to merge 4 commits into
mainfrom
ksh/gpu_ibm

Conversation

@kshyatt

@kshyatt kshyatt commented Oct 29, 2026

Copy link
Copy Markdown
Member

I think our original approach here was wrong, because we can use the BLAS methods as long as the view that's passed is densely packed. So right now we aren't using BLAS where we could (a dense patch of a higher dimensional tensor, for example) and we are trying to use it in dangerous places. Hopefully this fixes both.

@kshyatt
kshyatt requested a review from lkdvos October 29, 2026 13:26

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Comment thread ext/StridedGPUArraysExt.jl Outdated
@kshyatt

kshyatt commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

I got a little carried away here. I think we can get rid of the vendor specific extensions and just use LinearAlgebra.mul! which should dispatch to the vendor BLAS if it's available or fall back to GPUArrays' implementation if not.

@Jutho

Jutho commented Oct 29, 2026

Copy link
Copy Markdown
Member

Why is this packed columns (essentially: contiguous data) necessary. I thought gemm supports this via the "leading dimension" argument?

@kshyatt

kshyatt commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

The vendor gemms only support matrices whose first dimension (so rows for operation == N, cols for operation == T or C) has stride 1, right? It's the second dimension that can have lda > m.

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

Successfully merging this pull request may close these issues.

3 participants