SIGN IN SIGN UP

cuda_gds: include cuFile error details in error messages (#2069)

## What

Every cuFile error log in the GDS plugin now names the cuFile API that
failed and includes both the error string from `CUFILE_ERRSTR` and the
numeric error code.

This also fixes a misleading message in `submitBatch()`: a
`cuFileBatchIOSubmit` failure logged "Error in setting up Batch", the
same string used by the actual setup path in the `nixlGdsIOBatch`
constructor, so the two stages were indistinguishable in the logs.

## Why

While benchmarking GDS over NVMe in P2PDMA mode, batch submission failed
with nothing but this:

```
gds_utils.cpp:163] Error in setting up Batch
postXferReq: backend 'GDS' failed to post the transfer request with status NIXL_ERR_BACKEND
```

The real cause, a batch entry exceeding the cuFile P2PDMA per-entry size
limit, was only visible in `cufile.log`. The "setting up" wording cost
additional time, since setup had in fact succeeded.

The GDS_MT plugin already appends the numeric cuFile error code to its
logs, so this brings the GDS plugin in line with it.

## How

Each message now names the failing cuFile API and appends the
`CUFILE_ERRSTR` string along with the numeric code.

Verified on a B200 system with a Gen5 NVMe drive by rebuilding the
plugin and reproducing each failure.

**Batch submission failure** (P2PDMA per-entry size limit exceeded)

Before:
```
gds_utils.cpp:163] Error in setting up Batch
```
After:
```
gds_utils.cpp:169] cuFileBatchIOSubmit failed: batch submit internal error - retry later (err=5040)
```

**Batch setup failure** (`--gds_batch_limit 256`, above the cuFile limit
of 128), which previously printed the exact same message as the
submission failure above

Before:
```
gds_utils.cpp:103] Error in setting up Batch
```
After:
```
gds_utils.cpp:107] cuFileBatchIOSetUp failed: invalid arguments (err=5022)
```

**File handle registration on a filesystem without GDS support**
(overlayfs)

Before:
```
gds_utils.cpp:34] file register error:
```
After:
```
gds_utils.cpp:34] cuFileHandleRegister failed: GPUDirect Storage not supported on current file (err=5008)
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved CUDA GDS error messages with the failing API, descriptive
error text, and numeric error code.
* Updated the reported GDS initialization warning to accurately identify
driver-opening failures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Changhyeon Nam <hj04143@gmail.com>
C
Changhyeon Nam committed
aecbc3846d92c34c7507a58d776e1fda50ff4fba
Parent: 538dba3
Committed by GitHub <noreply@github.com> on 8/20/2026, 7:14:26 PM