Question

The CUBLAS library of NVIDIA CUDA allows finding the element/index with maximum absolute value (cublasIsamax). Is it possible to find the element/index with the maximum actual value somehow, using the CUBLAS reduction functions?

[I am using CUBLAS version 3.2.]

Edit
Constraint: I cannot alter the state of the production server in any way. This means that I cannot use thrust/cudpp, and that I'm stuck with using an older version of CUBLAS.

Was it helpful?

Solution

I am not sure what "reduction functions" you are referring to.

CUBLAS is basically just a "like-for-like" implementation of BLAS for CUDA devices. It only provides the standard Level 1, 2 and 3 BLAS functions, plus exactly three extensions - geam (scaled matrix addition/transposition), dgmm (diagonalised matrix-matrix dot product) and getrfBatched (batched LU factorisation for many small matrices). None of those functions will find the signed maximum value of a supplied vector or matrix.

NVIDIA ship cudpp and thrust, either of which are probably better for this sort operation. Also, CUBLAS 3.2 is two and a half years old.

As a final comment, I would strong recommend using either the CUBLAS 4.x or CUBLAS 5.x releases. The API and performance of the code has improved considerably, especially for newer hardware.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top