Skip to content

[v0.2.5+] Kernel Cache LRU Persistence #54

@m96-chan

Description

@m96-chan

Overview

Complete the Kernel Cache LRU system with persistent storage to avoid JIT recompilation across sessions.

Tasks

PTX Cache Persistence

  • Serialize compiled PTX to disk cache
  • Cache location: ~/.pygpukit/kernel_cache/
  • Invalidation on kernel source changes

Architecture Fingerprinting

  • SM version (compute capability)
  • Register file size
  • Shared memory size per SM
  • L2 cache size
  • Include in cache key

LRU Eviction

  • Max cache size limit (configurable)
  • LRU eviction policy
  • Cache stats/metrics API

Implementation Location

  • Update rust/pygpukit-core/src/kernel_cache.rs
  • Add persistence layer in Rust
  • Expose cache control via Python API

Benefits

  • Eliminate JIT compilation overhead on subsequent runs
  • Warm startup for production deployments
  • Architecture-aware caching prevents invalid kernel reuse

Related Issues

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