Skip to content

FEAT: Cache numeric Python UDF kernels - #24025

Draft
vyasr wants to merge 3 commits into
mainfrom
codex/cache-udf-kernels
Draft

FEAT: Cache numeric Python UDF kernels#24025
vyasr wants to merge 3 commits into
mainfrom
codex/cache-udf-kernels

Conversation

@vyasr

@vyasr vyasr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Description

Enable Numba's native on-disk CUDA cache for numeric Series.apply and DataFrame.apply kernels, including scalar arguments. The generated numeric kernels retain a persistent source location and carry their UDF identity in the cache key, allowing specializations to be reused by fresh Python processes.

String, NRT-using, and GroupBy UDF paths retain the existing linked-shim implementation because Numba cannot serialize kernels that link UDF_SHIM_FILE.

Persist the cache for the Conda and wheel cuDF Python-test jobs. The GitHub Actions key is scoped to CUDA, Python, architecture, Linux, GPU, and a hash of the cuDF Python sources/tests plus dependencies.yaml; a compatible previous cache is restored to carry unchanged specializations forward.

This temporarily pins the reusable workflow revision from rapidsai/shared-workflows#629. Once that dependency merges, the references can return to @main.

Testing

  • pytest -n 8 --dist=worksteal python/cudf/cudf/tests/series/methods/test_apply.py (94 passed, 22 xfailed)
  • pytest -n 8 --dist=worksteal python/cudf/cudf/tests/dataframe/methods/test_apply.py -k test_apply_return_literal (3 passed)
  • cuDF pre-commit hooks for the source and workflow changes (all applicable hooks passed)
  • actionlint for the shared-workflows changes; cuDF's existing unrelated custom-runner warnings remain

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vyasr vyasr added Python Affects Python cuDF API. ci labels Sep 7, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@vyasr

vyasr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@copy-pr-bot

copy-pr-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

/ok to test

@vyasr, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@vyasr vyasr added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Sep 7, 2026
@vyasr
vyasr force-pushed the codex/cache-udf-kernels branch from ef8146f to 2ef4032 Compare September 7, 2026 19:05
@copy-pr-bot

copy-pr-bot Bot commented Sep 7, 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.

@vyasr

vyasr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@vyasr
vyasr force-pushed the codex/cache-udf-kernels branch from 2ef4032 to 42f23b5 Compare September 7, 2026 19:08
@vyasr

vyasr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@vyasr
vyasr force-pushed the codex/cache-udf-kernels branch from 42f23b5 to 1ee5aa9 Compare September 7, 2026 19:48
@vyasr

vyasr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

1 similar comment
@vyasr

vyasr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@vyasr
vyasr force-pushed the codex/cache-udf-kernels branch from 1ee5aa9 to f784670 Compare September 7, 2026 20:46
@vyasr

vyasr commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant