# cuDSS 0.8.0 uniform batch (UBATCH\_SIZE \> ~160): NaN solutions depending on the content of unrelated device memory

**URL:** <https://forums.developer.nvidia.com/t/cudss-0-8-0-uniform-batch-ubatch-size-160-nan-solutions-depending-on-the-content-of-unrelated-device-memory/384903>\
**Category:** GPU-Accelerated Libraries\
**Tags:** cudss\
**Created:** [October 2, 2026, 3:28pm UTC](https://forums.developer.nvidia.com/t/cudss-0-8-0-uniform-batch-ubatch-size-160-nan-solutions-depending-on-the-content-of-unrelated-device-memory/384903 "2026-10-02T15:28:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralf.cortesdn](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ralf.cortesdn](https://forums.developer.nvidia.com/u/ralf.cortesdn)\
**Post date:** [October 2, 2026, 3:28pm UTC](https://forums.developer.nvidia.com/t/cudss-0-8-0-uniform-batch-ubatch-size-160-nan-solutions-depending-on-the-content-of-unrelated-device-memory/384903/1 "2026-10-02T15:28:04Z")

</div>

Hi,

We use cuDSS’s uniform batch mode (CUDSS\_CONFIG\_UBATCH\_SIZE) to solve many Newton-Raphson systems with the same sparsity pattern at once (power-flow security analysis). With batch sizes above ~160, part of the solutions come back as NaN, and whether they do depends on the content of device memory that was never given to cuDSS.

**Minimal reproduction** (attached, ~80 lines, CuPy + SciPy + nvmath.bindings.cudss):

- a batch of identical, well-conditioned tridiagonal systems (n = 100, diagonal 5, off-diagonals 1), CSR, general, full view, default configuration except CUDSS\_CONFIG\_UBATCH\_SIZE;
- one CSR descriptor and dense descriptors for a single system (n x 1, ld n); values, rhs and x hold the UBATCH\_SIZE systems back to back;
- ANALYSIS, FACTORIZATION, SOLVE;
- before creating the cuDSS objects, the script allocates an unrelated 64 MiB buffer with cudaMalloc, fills it with a byte pattern, keeps it allocated and never passes it to cuDSS.
- every solution is compared with the exact one.

```auto
 python cudss_ubatch_repro.py [--batch 512] [--fill 255|0|none] [--mb 64]

```

[cudss\_ubatch\_repro.txt](https://forums.developer.nvidia.com/uploads/short-url/jxYIS1twWINhgUVnfBYObItp1fi.txt) (4.1 KB)

**Results** (RTX PRO 6000 Blackwell Server Edition, driver 610.43.02, CUDA runtime 13.2, cuDSS 0.8.0, CuPy 14.2.0):

| UBATCH\_SIZE | unrelated buffer filled with 0xFF | filled with 0x00 | no buffer |
| --- | --- | --- | --- |
| 512 | 155-181 of 512 solutions contain NaN | 0 | 0 |
| 256 | 55 / 256 | 0 | 0 |
| 192 / 224 / 240 / 255 | 4 / 24 / 46 / 52 | - | - |
| 64, 128, 129, 160 | 0 | 0 | 0 |

The other solutions are exact (max error 9e-16). The number of NaN solutions grows with the size of the 0xFF region, and no single 4 MiB part of it triggers the problem on its own.

**What we checked** :

- compute-sanitizer --tool memcheck and --tool initcheck: 0 errors, while the NaN still appear;
- NaN guard zones before and after each of our buffers (values, rhs, x, row offsets, column indices): never read;
- a device memory handler (cudssSetDeviceMemHandler) that zero-fills every cuDSS allocation, plus padding, and never frees: the NaN still appear with the unrelated 0xFF buffer;
- CUDA\_MODULE\_LOADING=EAGER and warm-up solves before filling the buffer: no change;
- a random sparsity pattern of the same size: no NaN; our power-flow Jacobians: NaN in the same conditions.

So it looks like a kernel in the uniform batch path reads from addresses outside the buffers it was given or allocated, for batch sizes above ~160.

**Questions** :

1. Is this a known issue, and is it fixed in a later cuDSS release?
2. Is UBATCH\_SIZE \<= 128 a safe workaround in the meantime, or is something wrong in how we describe the batch?

Thanks!

PS: We also have a pure C version of the same reproduction (CUDA runtime + cuDSS only, no Python, ~150 lines, built with gcc). It gives the same results, prints every buffer’s address range and checks that none of the cuDSS inputs / outputs overlaps the unrelated buffer. Happy to share it if that is more convenient for you.

---

<div class="post-metadata">

**Author:** ![kvoronin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kvoronin](https://forums.developer.nvidia.com/u/kvoronin)\
**Post date:** [October 5, 2026, 5:05am UTC](https://forums.developer.nvidia.com/t/cudss-0-8-0-uniform-batch-ubatch-size-160-nan-solutions-depending-on-the-content-of-unrelated-device-memory/384903/2 "2026-10-05T05:05:02Z")

</div>

Hi @ralf.cortesdn!

Thanks for the report and a clean reproducer!

We have reproduced the issue (related to how shared memory was accessed) and confirmed that we have already fixed it and the fix will be available in the next released version of cuDSS.

So, answers to your questions are:

> Is this a known issue, and is it fixed in a later cuDSS release?

Yes and yes.

> Is UBATCH\_SIZE \<= 128 a safe workaround in the meantime, or is something wrong in how we describe the batch?

No, a reliable workaround would be UBATCH\_SIZE \<= 15.

Let us know if you have further feedback/questions about cuDSS!

Thanks,  
Kirill

---

<div class="post-metadata">

**Author:** ![ralf.cortesdn](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ralf.cortesdn](https://forums.developer.nvidia.com/u/ralf.cortesdn)\
**Post date:** [October 5, 2026, 12:49pm UTC](https://forums.developer.nvidia.com/t/cudss-0-8-0-uniform-batch-ubatch-size-160-nan-solutions-depending-on-the-content-of-unrelated-device-memory/384903/3 "2026-10-05T12:49:54Z")

</div>

Hi Kirill,

Thanks for your quick reply, and the workaround !  
Out of curiosity, do you have any ETA for the next cuDSS release ? I couldn’t find any information regarding the roadmap or upcoming versions.

Best,  
Ralf

---

<div class="post-metadata">

**Author:** ![kvoronin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kvoronin](https://forums.developer.nvidia.com/u/kvoronin)\
**Post date:** [October 5, 2026, 5:21pm UTC](https://forums.developer.nvidia.com/t/cudss-0-8-0-uniform-batch-ubatch-size-160-nan-solutions-depending-on-the-content-of-unrelated-device-memory/384903/4 "2026-10-05T17:21:48Z")

</div>

Hi Ralf!

At the moment we do not announce future release dates (unless under NDA). We are currently working to finalize the scope of the next release, and will share additional information when it becomes available.

Best,  
Kirill

---

<div class="post-metadata">

**Author:** ![ralf.cortesdn](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ralf.cortesdn](https://forums.developer.nvidia.com/u/ralf.cortesdn)\
**Post date:** [October 6, 2026, 7:51am UTC](https://forums.developer.nvidia.com/t/cudss-0-8-0-uniform-batch-ubatch-size-160-nan-solutions-depending-on-the-content-of-unrelated-device-memory/384903/5 "2026-10-06T07:51:02Z")

</div>

Hi Kirill,

Thanks for the quick answer again!  
Best of luck with the upcoming work. cuDSS is a really nice tool, and it definitely unlocks some exciting possibilities, so I’m looking forward to seeing how it evolves.

Best,  
Ralf

---

<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:** [October 20, 2026, 7:51am UTC](https://forums.developer.nvidia.com/t/cudss-0-8-0-uniform-batch-ubatch-size-160-nan-solutions-depending-on-the-content-of-unrelated-device-memory/384903/6 "2026-10-20T07:51:34Z")

</div>

Closed on October 20, 2026, 7:51am UTC

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