ROCm / rocSPARSE

Next generation SPARSE implementation for ROCm platform
https://rocm.docs.amd.com/projects/rocSPARSE/en/latest/
MIT License
117 stars 53 forks source link

[issue or Feature Request] extract the strictly lower part, diagonal, invert the diagonal, add-subtract matrices, deal with fill-inn? #366

Open klausbu opened 9 months ago

klausbu commented 9 months ago

Does rocsparse support the following operations: I can't find them, I hope I have been looking in the wrong spot but ChatGPT couldn't find these operations either.

Given a sparse, SPD matrix A stored on the GPU in CSR format using rocThrust vectors, there will be no host-device transfers, the application runs on the GPU once the initial data has been transferred to the GPU. This is part of the development of an AINV preconditioner.

*1: compute the matrix K1 = I-LD⁻1** where I is the identity matrix, L the stricktly lower part of A, and D⁻1 the invers diagonal of A

*2: compute the matrix K2 = I-D⁻1L^T** where I is the identity matrix, L^T the transpose of the stricktly lower part of A, and D⁻1 the invers diagonal of A

*3: compute the matrix P = K1K2 >> use rocsparse_dcsrmm(); this is possible how about 1: and 2: extract the strictly lower part, diagonal, invert the extracted diagonal, add-and-subtract matrices, deal with fill-inn (support thresholds)?**

I am using ROCm 5.7.1 on (RHEL) Almalinux 9.3 and I tested rocALUTION for the application which uses all these operations but due to its host-device approach it's not suitable for the application which is about on-device computation over thousands of timesteps.

ntrost57 commented 9 months ago

We will look into adding subroutines to extract (strictly) lower and upper triangular matrices in one of our future releases. It is however not clear to me, why rocalution does not work for you. You can exclusively work on the device when using rocalution. Data does not necessarily need to be copied e.g. from host.

ppanchad-amd commented 1 month ago

@klausbu Can you please test rocALUTION with ROCm 6.1.2 to see if your issue is resolved? Thanks