Skip to content

cuda: name the missing entry point in load_function errors - #10

Merged
sebcrozet merged 1 commit into
dimforge:mainfrom
haixuanTao:fix/load-function-error-entry
Sep 30, 2026
Merged

sebcrozet merged 1 commit into
dimforge:mainfrom
haixuanTao:fix/load-function-error-entry

Conversation

@haixuanTao

Copy link
Copy Markdown
Contributor

A failed load_function currently surfaces as a bare DriverError (CUDA_ERROR_NOT_FOUND) with no hint of which kernel was missing. The common causes — a stale prebuilt module, or a shader/host build mismatch where the host expects a kernel the module predates — are exactly the situations where the missing entry's name is the diagnostic you need (we've lost real time to this while iterating on nexus shader kernels).

This adds a LoadFunction variant to CudaBackendError carrying the entry-point name:

failed to load kernel entry point `gpu_reduce_contacts`: DriverError(CUDA_ERROR_NOT_FOUND, ...)

No behavior change on the success path; cargo check -p khal and cargo fmt --check clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01U2n9RqmxTJb8UG5d1Sjw4W

A failed load_function previously surfaced as a bare DriverError with no
hint of WHICH kernel was missing — the common cause being a stale prebuilt
module or a shader/host build mismatch, where the missing entry's name is
exactly the diagnostic you need. Add a LoadFunction error variant carrying
the entry-point name.
@sebcrozet
sebcrozet force-pushed the fix/load-function-error-entry branch from ca9ee7e to 296f1c2 Compare September 30, 2026 17:15
@sebcrozet
sebcrozet merged commit 1800a70 into dimforge:main Sep 30, 2026
4 checks passed
@sebcrozet

Copy link
Copy Markdown
Member

Thank you!

@sebcrozet sebcrozet mentioned this pull request Oct 4, 2026
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.

2 participants