An original LP/MILP/QP optimization solver core built from mathematical first principles, GPU-accelerated via CUDA, for SIH 2026 PS 26119.
View the Firefly Landing Page Repository
Firefly operates in a decoupled, three-tier architecture with a strict linear solve pipeline:
flowchart LR
A[Parser] --> B[Presolve]
B --> C[LP Core]
C --> D[MILP Engine]
D --> E[Output]
classDef stage fill:#1B1D18,stroke:#33362E,color:#E8E6DE
class A,B,C,D,E stage
- Parser: Reads MPS/LP file format. Validates structure, extracts objective coefficients, constraint matrix (CSR), RHS, and variable bounds.
- Presolve: Eliminates redundant rows and fixed variables, tightens bounds, and rescales the constraint matrix before dispatch.
- LP Core: GPU-native PDLP (primal–dual first-order) for large-scale continuous relaxations; CPU Simplex fallback for small dense instances.
- MILP Engine: Branch-and-bound over the LP core. Integer feasibility enforced per node; best-bound pruning limits the search tree.
- Output: Primal solution vector, objective value, status code, iteration count, and wall-clock time returned to API and UI.
GPU acceleration requires Windows or Linux with a compatible NVIDIA GPU.
macOS has never supported CUDA (Apple dropped it years ago; Apple Silicon has no NVIDIA hardware at all), so Firefly always runs via the CPU fallback path on macOS — the same path already built and tested with WITH_CUDA=OFF. This is a real hardware limitation, not a bug, and the existing landing page copy ("automatically uses your GPU if available, falls back to CPU otherwise") is already accurate for macOS without needing a separate disclaimer.
To install the standalone CLI , run this in PowerShell:
irm https://bit.ly/install-firefly | iexWarning
Windows Defender False Positive
Firefly is compiled into a single, high-performance executable using PyInstaller. Because it extracts its optimization libraries into a temporary folder at runtime, Windows Defender may occasionally flag it as a false positive (e.g. Wacatac.B!ml). This is a known issue with PyInstaller. If this happens, please click "More Info" -> "Run Anyway", or add firefly.exe to your Defender exclusions.
Requires CMake 3.25+ and NVIDIA CUDA Toolkit 12.0+ (target sm_89).
mkdir core/build && cd core/build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config ReleaseTo run the test suite:
cd core/build
ctest -C Release --output-on-failureA translation layer bridging programmatic requests to the C++ core via pybind11. Requires Python 3.10+.
# Compile and install the core Python bindings
pip install -e core --no-build-isolation
# Install API requirements
pip install -r api/requirements.txt
# Start the FastAPI server
uvicorn api.main:app --host 0.0.0.0 --port 8000Note on Windows: Ensure CUDA_PATH is set and its bin\x64 directory is accessible for DLL linking.
A telemetry interface engineered with a scientific instrumentation aesthetic (to be packaged as a Tauri desktop app).
cd web
npm install
npm run devThis project is licensed under the MIT License - see the LICENSE file for details.