gpu-optimizer

Featured

GPU optimization for consumer NVIDIA GPUs (8-24GB VRAM) covering mixed precision, gradient checkpointing, XGBoost GPU, CuPy/cuDF migration, and torch.compile. Triggers on: "optimize GPU training", "speed up CUDA", "reduce OOM", "migrate NumPy to CuPy", "manage GPU memory", "benchmark PyTorch".

AI & Automation 313 stars 46 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
83
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# GPU Optimizer Expert GPU optimization for consumer GPUs with 8–24GB VRAM. Evidence-based patterns only. ## Hardware Profile Fill in your hardware before applying optimizations: | Property | Your Value | | ----------------- | ------------------------------------------------ | | GPU model | (e.g., RTX 4080 Mobile, RTX 3090, RTX 4090) | | VRAM | (e.g., 12GB, 16GB, 24GB) | | CUDA version | (`nvidia-smi` → top-right) | | TDP / power limit | (laptop vs desktop affects sustained throughput) | | Driver version | (`nvidia-smi` → top-left) | Key constraint: VRAM capacity determines which strategies apply. Patterns below are annotated with minimum VRAM requirements where relevant. ## Optimization Categories ### 1. XGBoost GPU Acceleration **DMatrix vs QuantileDMatrix:** ```python # GPU-optimized: QuantileDMatrix is 1.8x faster dtrain = xgb.QuantileDMatrix(X_train.astype(np.float32)) dval = xgb.QuantileDMatrix(X_val.astype(np.float32)) # Standard: DMatrix (use for inference only) dtest = xgb.DMatrix(X_test.astype(np.float32)) ``` **Critical Parameters:** ```python params = { 'tree_method': 'hist', # GPU-accelerated histogram 'device': 'cuda:0', # Explicit GPU device 'max_bin': 256, # Higher bins = better splits (VRAM permitting) 'grow_policy': 'depthwise', # vs 'lossguide' for i...

Details

Author
Mathews-Tom
Repository
Mathews-Tom/armory
Created
5 months ago
Last Updated
4 days ago
Language
Python
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category