Skip to content

cudss: support 0.8.0+ API (offsetType + cudssDataType_t)#397

Merged
bodono merged 2 commits into
masterfrom
fix-cudss-0.8-api
Jun 15, 2026
Merged

cudss: support 0.8.0+ API (offsetType + cudssDataType_t)#397
bodono merged 2 commits into
masterfrom
fix-cudss-0.8-api

Conversation

@bodono

@bodono bodono commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary

The `Build and Test cudss` and `GPU` CI jobs started failing on master once the runner image picked up cuDSS 0.8.x. The new release made two breaking changes to the matrix-creation API:

  • `cudssMatrixCreateCsr` gained a new `offsetType` parameter immediately before `indexType` — 14 args now instead of 13.
  • All matrix-creation functions take `cudssDataType_t` instead of `cudaDataType_t`, so `CUDA_R_64F` / `CUDA_R_32I` / etc. must be replaced with `CUDSS_R_64F` / `CUDSS_R_32I` / etc.

(Migration notes: https://docs.nvidia.com/cuda/cudss/migration_guide.html)

This PR wraps both changes in a `#if SCS_CUDSS_NEW_API` guard driven by `CUDSS_VER_MAJOR` / `CUDSS_VER_MINOR` (both defined in `cudss.h`), so the same source still builds against older cuDSS (≤ 0.7.x).

`SCS_CUDA_FLOAT` / `SCS_CUDA_INDEX` already abstracted the type tokens — they now resolve to the right enum based on the detected cuDSS version. The CSR create call is the one place that needs a structurally different argument list, so that is the only call site with a `#if/#else`. The Dn calls only take one data-type arg in both APIs, so the existing macro substitution suffices.

Test plan

  • CI: `Build and Test cudss` (linux) goes green
  • CI: `GPU` (linux) goes green
  • CI: all other jobs stay green

bodono added 2 commits June 6, 2026 14:38
cuDSS 0.8.0 made two breaking changes to the matrix-creation API:

  - `cudssMatrixCreateCsr` gained a new `offsetType` parameter
    immediately before `indexType`, so the call now takes 14 args
    instead of 13.
  - All matrix-creation functions take `cudssDataType_t` instead of
    `cudaDataType_t`, so `CUDA_R_64F`/`CUDA_R_32I`/... must be replaced
    with `CUDSS_R_64F`/`CUDSS_R_32I`/...

Guarded on `CUDSS_VER_MAJOR`/`CUDSS_VER_MINOR` so the same source still
compiles against older cuDSS (<=0.7.x).

The `Build and Test cudss` and `GPU` CI jobs started failing on master
when the runner image picked up cuDSS 0.8.x; this restores them.
cudss.h defines CUDSS_VERSION_MAJOR / _MINOR / _PATCH and the composite
CUDSS_VERSION = MAJOR*10000 + MINOR*100 + PATCH. The earlier guard used
CUDSS_VER_MAJOR, which doesn't exist, so SCS_CUDSS_NEW_API was always 0
and the old call site still failed to compile against cuDSS 0.8.x.
@bodono
bodono merged commit 0abc80b into master Jun 15, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant