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
-
Install uv if not already installed:
curl -LsSf https://astral.sh/uv/install.sh | sh
-
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:
- Detect your NVIDIA GPU and verify CUDA availability
- Download a test model (first run only, ~4GB)
- Load the model into GPU memory
- 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
- Specification - Feature requirements and user stories
- Quickstart Guide - Setup and troubleshooting
- Implementation Plan - Technical architecture
- CLI Contracts - Command interface specification
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cff643bfd4dbc3bc3951afd3a239b4b58f9e9ab6bcb6ab2c7d6de4424b9759c1
|
|
| MD5 |
eb853892b6a28ccaa3be06b5186968ab
|
|
| BLAKE2b-256 |
543c81178dfd72068fc23b0dace96d9cdd57d9086f7b3da8574ac1645d8d882e
|
Provenance
The following attestation bundles were made for kcuda_validate-0.1.2.tar.gz:
Publisher:
publish.yml on kenhia/kcuda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kcuda_validate-0.1.2.tar.gz -
Subject digest:
cff643bfd4dbc3bc3951afd3a239b4b58f9e9ab6bcb6ab2c7d6de4424b9759c1 - Sigstore transparency entry: 890626258
- Sigstore integration time:
-
Permalink:
kenhia/kcuda@7083630687ce0c5362a956e815351580d2ff4997 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/kenhia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7083630687ce0c5362a956e815351580d2ff4997 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d62d153db2ae777824dbbbd75e1312ee12a04815d6bbdeaf28dfd2164fc97e6
|
|
| MD5 |
2e845ab128a7818c2e636b05df8e1ab0
|
|
| BLAKE2b-256 |
b85872dfa1cfe5982a746ac73fcbf5994086ab31e9e255d9ea3c2123c1c95613
|
Provenance
The following attestation bundles were made for kcuda_validate-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on kenhia/kcuda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kcuda_validate-0.1.2-py3-none-any.whl -
Subject digest:
8d62d153db2ae777824dbbbd75e1312ee12a04815d6bbdeaf28dfd2164fc97e6 - Sigstore transparency entry: 890626291
- Sigstore integration time:
-
Permalink:
kenhia/kcuda@7083630687ce0c5362a956e815351580d2ff4997 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/kenhia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7083630687ce0c5362a956e815351580d2ff4997 -
Trigger Event:
release
-
Statement type: