Skip to content

[FEA] Clarify or support CPU fallback when CUDA is unavailable #870

Description

@maifeeulasad

Is your feature request related to a problem? Please describe.
When using @cuda.jit, execution requires a CUDA-capable device at runtime. In environments where CUDA is unavailable (e.g., CPU-only systems, CI pipelines, or heterogeneous deployments), the code fails instead of degrading gracefully. This forces developers to maintain separate CPU (@njit) and GPU (@cuda.jit) implementations, increasing complexity and duplication.

Describe the solution you'd like
Provide an optional CPU fallback mechanism (in the decorator itself, @cuda.jit(fallback_to_cpu=True)) which defaults to false. So the exisiting behaviour doesn't change. But as soon as we enable it. Voila! We are good.

Describe alternatives you've considered
n/a

Additional context
Willing to work on this one!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions