-
-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
Hi @coreylowman
Amazing library you've put together! I was hoping you could help me understand how to use the cusolverDnDgeqrf
function.
I currently have a struct
pub(crate) struct CudaMatrix {
nrows: usize,
ncols: usize,
data: CudaSlice<f64>,
}
and I'm trying to write a function
fn geqrf(&self, mut matrix: CudaMatrix) -> CudaMatrix {
let stream = self.ctx.default_stream();
let dn_handle = DnHandle::new(stream).unwrap();
let m = matrix.nrows as c_int;
let n = matrix.ncols as c_int;
let lda = matrix.nrows as c_int;
unsafe {
// cusolverDnSgeqrf_bufferSize()
cusolverDnDgeqrf(dn_handle.cu(), m, n, matrix.data, lda, );
}
todo!()
}
It doesn't seem that passing matrix.data
to cusolverDnDgeqrf
is right, though. What should I be doing here?
As a follow-up, would it take a lot to write a safe wrapper for this function? If it's not an incredibly complicated undertaking, I would be happy to contribute a PR in that direction.
Metadata
Metadata
Assignees
Labels
No labels