Skip to content

Deprecate multi-poll dispatch getter/setter - #1088

Merged
rapids-bot[bot] merged 9 commits into
rapidsai:mainfrom
kingcrimsontianyu:deprecate-dispatch
Oct 23, 2026
Merged

rapids-bot[bot] merged 9 commits into
rapidsai:mainfrom
kingcrimsontianyu:deprecate-dispatch

Conversation

@kingcrimsontianyu

@kingcrimsontianyu kingcrimsontianyu commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

This PR deprecates multi-poll's dispatch getter and setter and uses SHARED_QUEUE universally. This will substantially simplify the current code and also simplify the batch API implementation.

KVIKIO_REMOTE_IO_MAX_CONCURRENT_REQUESTS=0 (unlimited) is still allowed, under which case each reactor takes at most an even share of the queue per pass.

@kingcrimsontianyu kingcrimsontianyu added non-breaking Introduces a non-breaking change python Affects the Python API of KvikIO c++ Affects the C++ API of KvikIO labels Oct 2, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@kingcrimsontianyu kingcrimsontianyu added the improvement Improves an existing functionality label Oct 2, 2026
@kingcrimsontianyu

Copy link
Copy Markdown
Contributor Author

/ok to test

@kingcrimsontianyu
kingcrimsontianyu marked this pull request as ready for review October 19, 2026 02:35
@kingcrimsontianyu
kingcrimsontianyu requested review from a team as code owners October 19, 2026 02:35

@madsbk madsbk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good but I think we should also log a deprecation warning when KVIKIO_REMOTE_IO_REACTOR_DISPATCH is set, saying that it is ignored and will be removed in the next release.

Comment thread cpp/include/kvikio/defaults.hpp Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dead code now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Cleaned up both the .hpp and .cpp files.
It makes sense to log a warning when the env var is set. Made the changes accordingly.

@kingcrimsontianyu

Copy link
Copy Markdown
Contributor Author

Sorry that I added you to the wrong PR @Matt711!

@kingcrimsontianyu

Copy link
Copy Markdown
Contributor Author

Temporarily hold off on the merge, as @Matt711 may have observed that PER_CHUNK outperforms SHARED_QUEUE in some situations.

@kingcrimsontianyu

Copy link
Copy Markdown
Contributor Author

I ran SF-1K and SF-300, and I'm not able to reproduce. For SF-300 the numbers swing a lot: in the first pass, PER_CHUNK wins, whereas in the second pass SHARED_QUEUE wins. If we take the means, SHARED_QUEUE still wins slightly.

- Use PER_CHUNK in main
- Unset in this PR, since SHARED_QUEUE is always used
+---------+----------------------+----------+----------+----------+----------+----------+----------+
|         |                      |              Iter 1            |              Iter 2            |
+---------+----------------------+----------+----------+----------+----------+----------+----------+
| data    | run                  |     main |       PR |    PR vs |     main |       PR |    PR vs |
|         |                      |   PC (s) |   SQ (s) |     main |   PC (s) |   SQ (s) |     main |
+---------+----------------------+----------+----------+----------+----------+----------+----------+
| SF-1K   | pass 1 (main first)  |    203.5 |    196.5 |    -3.4% |    182.5 |    180.4 |    -1.2% |
+---------+----------------------+----------+----------+----------+----------+----------+----------+
| SF-300  | pass 1 (PR first)    |     61.8 |     66.4 |    +7.3% |     44.0 |     52.4 |   +19.0% |
| SF-300  | pass 2 (main first)  |     79.4 |     64.1 |   -19.3% |     57.8 |     46.7 |   -19.2% |
| SF-300  | mean of 2 passes     |     70.6 |     65.2 |    -7.6% |     50.9 |     49.5 |    -2.7% |
+---------+----------------------+----------+----------+----------+----------+----------+----------+

@kingcrimsontianyu

Copy link
Copy Markdown
Contributor Author

Also ran SF-100 back to back multiple times.

+-------+--------+-------+-----------+-----------+---------+
|   run |    arm | start |    iter 1 |    iter 2 |    wall |
+-------+--------+-------+-----------+-----------+---------+
|     1 |     PR | 14:53 |      32.8 |      19.3 |      69 |
|     2 |   main | 14:55 |      31.8 |      18.1 |      67 |
|     3 |   main | 14:56 |      33.4 |      20.2 |      69 |
|     4 |     PR | 14:57 |      32.5 |      19.5 |      69 |
|     5 |     PR | 14:59 |      31.4 |      18.7 |      67 |
|     6 |   main | 15:00 |      33.1 |      19.6 |      69 |
|     7 |   main | 15:01 |      32.0 |      19.7 |      67 |
|     8 |     PR | 15:03 |      31.7 |      18.8 |      67 |
|     9 |     PR | 15:04 |      34.3 |      21.3 |      71 |
|    10 |   main | 15:06 |      34.8 |      20.3 |      71 |
+-------+--------+-------+-----------+-----------+---------+

Summary
+--------------+----------------------------+----------------------------+------------+
|              |             main PER_CHUNK |            PR SHARED_QUEUE | PR vs main |
+--------------+----------------------------+----------------------------+------------+
| iter 1 sum   |   33.0 +- 1.2 [31.8, 34.8] |   32.6 +- 1.1 [31.4, 34.3] |      -1.4% |
| iter 2 sum   |   19.6 +- 0.9 [18.1, 20.3] |   19.5 +- 1.1 [18.7, 21.3] |      -0.1% |
+--------------+----------------------------+----------------------------+------------+

rapids-bot Bot pushed a commit to NVIDIA/cudf that referenced this pull request Oct 23, 2026
KvikIO rapidsai/kvikio#1088 makes the MULTI_POLL reactors always take work from one shared queue, and deprecates the reactor dispatch setting. kvikio.defaults.get/set("remote_io_reactor_dispatch") now emits a FutureWarning, and setting it has no effect. cudf-polars calls both whenever it configures KvikIO for a MULTI_POLL engine, which breaks the test suite under the `filterwarnings = error` setup.

This PR removes the `kvikio_reactor_dispatch` executor option and its `CUDF_POLARS__EXECUTOR__KVIKIO_REACTOR_DISPATCH` environment variable, so cudf-polars no longer reads or sets the dispatch in KvikIO. This is a breaking change. Once #1088 is merged the option would have no effect anyway.

Authors:
  - Tianyu Liu (https://github.com/kingcrimsontianyu)

Approvers:
  - Tom Augspurger (https://github.com/TomAugspurger)

URL: #24681
@kingcrimsontianyu

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit bed88c5 into rapidsai:main Oct 23, 2026
314 of 330 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Affects the C++ API of KvikIO improvement Improves an existing functionality non-breaking Introduces a non-breaking change python Affects the Python API of KvikIO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants