Skip to content

StreamingEngine._reset() - #22364

Merged
rapids-bot[bot] merged 5 commits into
NVIDIA:mainfrom
madsbk:engine_reset
May 5, 2026
Merged

StreamingEngine._reset()#22364
rapids-bot[bot] merged 5 commits into
NVIDIA:mainfrom
madsbk:engine_reset

Conversation

@madsbk

@madsbk madsbk commented May 4, 2026

Copy link
Copy Markdown
Contributor

Generalizes RayEngine._reset() to SPMDEngine and DaskEngine. All three engines now swap the rapidsmpf Context and the Polars GPUEngine configuration in place, while keeping the communicator and RMM resource alive.

The test suite is refactored to take advantage of this. A session-scoped streaming_engines fixture bootstraps the SPMD communicator and constructs a shared SPMDEngine. Per-test spmd_engine and streaming_engine_factory fixtures call _reset on the cached engine instead of constructing a new one.

This pattern will be extended to RayEngine and DaskEngine tests in the future as they are incorporated into the test matrix.

@madsbk madsbk self-assigned this May 4, 2026
@madsbk madsbk added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 4, 2026
@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels May 4, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python May 4, 2026
@madsbk
madsbk force-pushed the engine_reset branch 4 times, most recently from 94ae3b1 to 0156d3f Compare May 4, 2026 19:45
@madsbk
madsbk marked this pull request as ready for review May 4, 2026 20:36
@madsbk
madsbk requested a review from a team as a code owner May 4, 2026 20:36
@madsbk
madsbk requested a review from wence- May 4, 2026 20:36
@NVIDIA NVIDIA deleted a comment from copy-pr-bot Bot May 4, 2026
Comment thread python/cudf_polars/cudf_polars/experimental/rapidsmpf/frontend/spmd.py Outdated
Comment thread python/cudf_polars/cudf_polars/experimental/rapidsmpf/frontend/spmd.py Outdated
Comment thread python/cudf_polars/tests/conftest.py
Comment thread python/cudf_polars/tests/experimental/test_dask.py
Comment thread python/cudf_polars/tests/experimental/test_spmd.py
@madsbk
madsbk requested a review from pentschev May 5, 2026 13:08

@pentschev pentschev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Mads.

madsbk added a commit to madsbk/cudf that referenced this pull request May 5, 2026
Singleton commit
Depend on NVIDIA#22364
@madsbk

madsbk commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit e0769e0 into NVIDIA:main May 5, 2026
179 of 184 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python May 5, 2026
@madsbk
madsbk deleted the engine_reset branch May 6, 2026 06:07
galipremsagar pushed a commit to galipremsagar/cudf that referenced this pull request May 6, 2026
Generalizes `RayEngine._reset()` to `SPMDEngine` and `DaskEngine`. All three engines now swap the rapidsmpf `Context` and the Polars `GPUEngine` configuration in place, while keeping the communicator and RMM resource alive.

The test suite is refactored to take advantage of this. A session-scoped `streaming_engines` fixture bootstraps the SPMD communicator and constructs a shared `SPMDEngine`. Per-test `spmd_engine` and `streaming_engine_factory` fixtures call `_reset` on the cached engine instead of constructing a new one.

This pattern will be extended to `RayEngine` and `DaskEngine` tests in the future as they are incorporated into the test matrix.

Authors:
  - Mads R. B. Kristensen (https://github.com/madsbk)

Approvers:
  - Peter Andreas Entschev (https://github.com/pentschev)

URL: NVIDIA#22364
rapids-bot Bot pushed a commit that referenced this pull request May 7, 2026
…22381)

Builds on the cached `streaming_engines` fixture from #22364, which amortizes SPMD bootstrap via `_reset()`, and extends the same pattern to Dask and Ray.

With this change, the test matrix runs against:

`["in-memory", "spmd", "spmd-small", "dask", "ray"]`

subject to package availability and `rrun` gating.

We might change the different setups later, but for now CI runs:

| Engine        | Block Size(s)         | GPU Configuration |
|----------------|-----------------------|-------------------|
| `SPMDEngine`   | `"medium"`, `"small"` | Single GPU        |
| `DaskEngine`   | `"medium"`            | Single GPU        |
| `RayEngine`    | `"medium"`            | Two GPUs          |

Authors:
  - Mads R. B. Kristensen (https://github.com/madsbk)
  - Peter Andreas Entschev (https://github.com/pentschev)

Approvers:
  - Matthew Murray (https://github.com/Matt711)
  - Bradley Dice (https://github.com/bdice)
  - Peter Andreas Entschev (https://github.com/pentschev)
  - Matthew Roeschke (https://github.com/mroeschke)

URL: #22381
galipremsagar pushed a commit to galipremsagar/cudf that referenced this pull request May 8, 2026
…VIDIA#22381)

Builds on the cached `streaming_engines` fixture from NVIDIA#22364, which amortizes SPMD bootstrap via `_reset()`, and extends the same pattern to Dask and Ray.

With this change, the test matrix runs against:

`["in-memory", "spmd", "spmd-small", "dask", "ray"]`

subject to package availability and `rrun` gating.

We might change the different setups later, but for now CI runs:

| Engine        | Block Size(s)         | GPU Configuration |
|----------------|-----------------------|-------------------|
| `SPMDEngine`   | `"medium"`, `"small"` | Single GPU        |
| `DaskEngine`   | `"medium"`            | Single GPU        |
| `RayEngine`    | `"medium"`            | Two GPUs          |

Authors:
  - Mads R. B. Kristensen (https://github.com/madsbk)
  - Peter Andreas Entschev (https://github.com/pentschev)

Approvers:
  - Matthew Murray (https://github.com/Matt711)
  - Bradley Dice (https://github.com/bdice)
  - Peter Andreas Entschev (https://github.com/pentschev)
  - Matthew Roeschke (https://github.com/mroeschke)

URL: NVIDIA#22381
shrshi pushed a commit to shrshi/cudf that referenced this pull request May 12, 2026
Generalizes `RayEngine._reset()` to `SPMDEngine` and `DaskEngine`. All three engines now swap the rapidsmpf `Context` and the Polars `GPUEngine` configuration in place, while keeping the communicator and RMM resource alive.

The test suite is refactored to take advantage of this. A session-scoped `streaming_engines` fixture bootstraps the SPMD communicator and constructs a shared `SPMDEngine`. Per-test `spmd_engine` and `streaming_engine_factory` fixtures call `_reset` on the cached engine instead of constructing a new one.

This pattern will be extended to `RayEngine` and `DaskEngine` tests in the future as they are incorporated into the test matrix.

Authors:
  - Mads R. B. Kristensen (https://github.com/madsbk)

Approvers:
  - Peter Andreas Entschev (https://github.com/pentschev)

URL: NVIDIA#22364
shrshi pushed a commit to shrshi/cudf that referenced this pull request May 12, 2026
…VIDIA#22381)

Builds on the cached `streaming_engines` fixture from NVIDIA#22364, which amortizes SPMD bootstrap via `_reset()`, and extends the same pattern to Dask and Ray.

With this change, the test matrix runs against:

`["in-memory", "spmd", "spmd-small", "dask", "ray"]`

subject to package availability and `rrun` gating.

We might change the different setups later, but for now CI runs:

| Engine        | Block Size(s)         | GPU Configuration |
|----------------|-----------------------|-------------------|
| `SPMDEngine`   | `"medium"`, `"small"` | Single GPU        |
| `DaskEngine`   | `"medium"`            | Single GPU        |
| `RayEngine`    | `"medium"`            | Two GPUs          |

Authors:
  - Mads R. B. Kristensen (https://github.com/madsbk)
  - Peter Andreas Entschev (https://github.com/pentschev)

Approvers:
  - Matthew Murray (https://github.com/Matt711)
  - Bradley Dice (https://github.com/bdice)
  - Peter Andreas Entschev (https://github.com/pentschev)
  - Matthew Roeschke (https://github.com/mroeschke)

URL: NVIDIA#22381
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cudf-polars Issues specific to cudf-polars improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants