# Support for the DIA Format

**URL:** <https://forums.developer.nvidia.com/t/support-for-the-dia-format/303501>\
**Category:** GPU-Accelerated Libraries\
**Tags:** cusparse\
**Created:** [August 15, 2024, 2:09pm UTC](https://forums.developer.nvidia.com/t/support-for-the-dia-format/303501 "2024-08-15T14:09:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![atyagi2](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@atyagi2](https://forums.developer.nvidia.com/u/atyagi2)\
**Post date:** [August 15, 2024, 2:09pm UTC](https://forums.developer.nvidia.com/t/support-for-the-dia-format/303501/1 "2024-08-15T14:09:25Z")

</div>

Hi,  
I was reading through [cuSparse](https://docs.nvidia.com/cuda/cusparse/) documentation for the available sparsity formats. I am wondering if the DIA format (as mentioned in this [paper](https://www.nvidia.com/docs/io/66889/nvr-2008-004.pdf)) is supported by cuSparse or not?

If not, what will it require to implement our own kernel supporting the DIA format?

---

<div class="post-metadata">

**Author:** ![qanhpham](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@qanhpham](https://forums.developer.nvidia.com/u/qanhpham)\
**Post date:** [August 15, 2024, 3:47pm UTC](https://forums.developer.nvidia.com/t/support-for-the-dia-format/303501/2 "2024-08-15T15:47:12Z")

</div>

Hi @atyagi2. cuSparse doesn’t support DIA format at the moment.

> If not, what will it require to implement our own kernel supporting the DIA format?

Sorry, I don’t get your question. Can you tell me what’s your use case that needs DIA format in cuSparse?

---

<div class="post-metadata">

**Author:** ![atyagi2](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@atyagi2](https://forums.developer.nvidia.com/u/atyagi2)\
**Post date:** [August 15, 2024, 3:59pm UTC](https://forums.developer.nvidia.com/t/support-for-the-dia-format/303501/3 "2024-08-15T15:59:13Z")

</div>

Hi @qanhpham. Thank you for your response.

I want to carry out large matrix-matrix or matrix-vector calculations where the matrices are sparse and have non-zeros only on the diagonals. The DIA format is an exact fit for representing such matrices.

Since DIA is not supported by cuSparse, I can either represent the matrices using CSR, COO, etc., or maybe modify cuSparse to support representing matrices in the DIA format. How will I do that?

---

<div class="post-metadata">

**Author:** ![qanhpham](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@qanhpham](https://forums.developer.nvidia.com/u/qanhpham)\
**Post date:** [August 15, 2024, 10:26pm UTC](https://forums.developer.nvidia.com/t/support-for-the-dia-format/303501/4 "2024-08-15T22:26:27Z")

</div>

You can use CSR, COO formats for your computation.  
You can’t modify cuSparse to add support for DIA format. We can add this feature of there are many requests for it; for now, we don’t have plan to do this support.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [August 29, 2024, 10:26pm UTC](https://forums.developer.nvidia.com/t/support-for-the-dia-format/303501/5 "2024-08-29T22:26:27Z")

</div>

Closed on August 29, 2024, 10:26pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
