gale-v2-refactor

Consolidate gale CPU and GPU optimization into a refactor plan.

1|Updated May 29, 2026
One-click install
npx skills add https://github.com/ianrgraham/gale --skill gale-v2-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gale-v2-refactor
Source: https://github.com/ianrgraham/gale/tree/main/.claude/skills/gale-v2-refactor
Command: npx skills add https://github.com/ianrgraham/gale --skill gale-v2-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you consolidate gale's accumulated CPU and GPU optimization work into cleaner building blocks without sacrificing the measured performance edge or the discipline needed to keep it.

Core Features & Use Cases

  • Refactor planning: Organize the codebase around a clearer Sim and Device abstraction while preserving the current solver behavior.
  • Performance protection: Keep benchmark baselines, profiling gates, and correctness checks intact during the migration from prototype structure to production structure.
  • Workflow discipline: Apply the hard-won rules from prior optimization sessions to avoid comparing mismatched algorithms, misleading measurements, and incomplete validation.
  • Use case: When splitting a dense solver implementation into reusable CPU and GPU building blocks, this Skill helps you decide the order of changes and the guardrails required to keep results stable.

Quick Start

Use the gale v2 refactor skill to review the current design, align the refactor plan with docs/gale-v2-refactor.md, and propose the next implementation step without regressing the benchmark baseline.

Frequently Asked Questions about gale-v2-refactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor GPU code without losing CUDA performance during solver migration?

To refactor GPU code without losing CUDA performance, consolidate CPU and GPU optimization work into cleaner building blocks while keeping benchmark baselines, profiling gates, and correctness checks intact throughout the solver migration.

What is the best way to split a dense multi-GPU solver implementation into reusable abstractions?

The best way to split a dense multi-GPU solver is organizing the codebase around clearer Sim and Device abstractions while applying regression baselines and algorithm-matched comparisons to prevent misleading performance conclusions during the separation.

Why does profiling discipline matter when refactoring multigrid simulation code?

Profiling discipline matters when refactoring multigrid simulation code because it enforces regression baselines and algorithm-matched comparisons, preventing misleading performance measurements and incomplete validation during the transition from prototype to production structure.

Can I restructure production-path validation workflows for multi-GPU solvers without regressing benchmarks?

Yes, you can restructure production-path validation workflows for multi-GPU solvers without regressing benchmarks by freezing benchmark baselines and applying profiling gates before proposing the next implementation step in the refactor plan.

What are the limitations of comparing mismatched algorithms during CUDA optimization refactoring?

Comparing mismatched algorithms during CUDA optimization refactoring produces misleading performance conclusions and invalidates correctness checks, which is why applying strict profiling discipline and algorithm-matched comparisons is required to maintain stable solver results.