Skip to content

[v0.2.5+] JIT Compiler Stabilization (NVRTC Robustness) #55

Closed

Description

@m96-chan

Overview

Improve NVRTC JIT compiler robustness with error handling, retry logic, and fallback paths.

Tasks

NVRTC Error Handling

  • Comprehensive error code mapping
  • Retry logic for transient failures
  • Detailed error messages with context
  • Log compilation errors for debugging

JIT Warmup Cache

  • Pre-compile common kernels on first import
  • Background compilation thread
  • Warmup progress indicator (optional)

PTX ISA Mismatch Fallback

  • Detect PTX version vs driver capability mismatch
  • Fallback to compatible PTX version
  • Warning when using fallback path
  • Document minimum driver versions

Implementation Location

  • native/jit/ - C++ NVRTC wrapper
  • rust/pygpukit-core/ - Rust coordination

Related Issues

Notes

This is separate from v0.2.4's goal of shipping NVRTC DLLs. This issue focuses on making the JIT compiler more robust regardless of how NVRTC is loaded.

Activity

  1. m96-chan commented on Dec 15, 2025

    @m96-chan
    OwnerAuthor

    Completed in v0.2.5

    JIT Compiler Stabilization

    • Improved NVRTC error handling and reporting
    • Architecture fallback chain (sm_90 → sm_89 → sm_86 → sm_80)
    • Better driver compatibility checks
    • Warmup mechanism for reliable initialization

    Robustness Improvements

    • check_driver_compatibility() for version validation
    • get_driver_requirements() returns minimum versions
    • Graceful fallback when NVRTC unavailable
    • Clear error messages for common issues

    Integration with Kernel Cache

    PR: #61

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions