Skip to main content

CUDA LLM Hardware Validation Tool for WSL2

Project description

CUDA LLM Hardware Validation

A minimal Python CLI tool to validate NVIDIA GPU hardware accessibility in WSL2 for LLM inference using CUDA acceleration.

Quick Start

See the Quickstart Guide for installation and usage.

Overview

This tool validates that your WSL2 environment can:

  • ✅ Detect NVIDIA GPU hardware via CUDA
  • ✅ Download and load GGUF model files into GPU memory
  • ✅ Execute GPU-accelerated inference for text generation

Installation

Prerequisites

  1. Install uv if not already installed:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Ensure NVIDIA drivers are installed on Windows host (for WSL2)

Install from Source

# Clone repository
git clone https://github.com/kenhia/kcuda.git
cd kcuda

# Install with uv (creates virtual environment automatically)
uv sync

# Run the tool
uv run kcuda-validate --version

Verify Installation

# Check all dependencies are installed
uv run kcuda-validate --version

# Run GPU detection to verify CUDA setup
uv run kcuda-validate detect

Usage

Quick Validation

Run the complete validation pipeline in one command:

uv run kcuda-validate validate-all

This will:

  1. Detect your NVIDIA GPU and verify CUDA availability
  2. Download a test model (first run only, ~4GB)
  3. Load the model into GPU memory
  4. Run a simple inference test

Individual Commands

# Detect GPU hardware only
uv run kcuda-validate detect

# Load a specific model
uv run kcuda-validate load \
  --repo-id TheBloke/Mistral-7B-Instruct-v0.2-GGUF \
  --filename mistral-7b-instruct-v0.2.Q4_K_M.gguf

# Run inference with custom prompt
uv run kcuda-validate infer "Explain quantum computing in simple terms"

# Run inference with options
uv run kcuda-validate infer \
  --max-tokens 100 \
  --temperature 0.8 \
  "Tell me a story"

Global Options

# Verbose output (DEBUG logging)
uv run kcuda-validate -v detect

# Quiet mode (ERROR only)
uv run kcuda-validate -q validate-all

# Custom log file
uv run kcuda-validate --log-file /tmp/kcuda.log detect

# Show version and dependencies
uv run kcuda-validate --version

Environment Variables

# Custom log directory
export KCUDA_LOG_DIR=~/logs
uv run kcuda-validate detect

# Custom log level
export KCUDA_LOG_LEVEL=DEBUG
uv run kcuda-validate detect

Requirements

  • WSL2 with Ubuntu 20.04+ or Debian 11+
  • NVIDIA GPU with 6GB+ VRAM
  • NVIDIA Driver 510.06+ on Windows host
  • Python 3.11+
  • uv package manager

Documentation

Development

# Run tests
uv run pytest tests/ -v

# Format code
uv run ruff format .

# Lint code
uv run ruff check --fix .

# Pre-commit checks (constitution requirement)
uv run ruff format . && uv run ruff check --fix . && uv run pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kcuda_validate-0.1.2.tar.gz (74.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kcuda_validate-0.1.2-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file kcuda_validate-0.1.2.tar.gz.

File metadata

  • Download URL: kcuda_validate-0.1.2.tar.gz
  • Upload date:
  • Size: 74.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kcuda_validate-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cff643bfd4dbc3bc3951afd3a239b4b58f9e9ab6bcb6ab2c7d6de4424b9759c1
MD5 eb853892b6a28ccaa3be06b5186968ab
BLAKE2b-256 543c81178dfd72068fc23b0dace96d9cdd57d9086f7b3da8574ac1645d8d882e

See more details on using hashes here.

Provenance

The following attestation bundles were made for kcuda_validate-0.1.2.tar.gz:

Publisher: publish.yml on kenhia/kcuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kcuda_validate-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: kcuda_validate-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kcuda_validate-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d62d153db2ae777824dbbbd75e1312ee12a04815d6bbdeaf28dfd2164fc97e6
MD5 2e845ab128a7818c2e636b05df8e1ab0
BLAKE2b-256 b85872dfa1cfe5982a746ac73fcbf5994086ab31e9e255d9ea3c2123c1c95613

See more details on using hashes here.

Provenance

The following attestation bundles were made for kcuda_validate-0.1.2-py3-none-any.whl:

Publisher: publish.yml on kenhia/kcuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page