- CMakeLists.txt with libtorch, GoogleTest, GoogleBenchmark, OpenMP, pybind11 - Header files: config, controller, population, fitness, evolution, spectral, oscillation, telemetry, optimizer - Source implementations: controller (full micro-MLP forward pass, mutation, crossover), fitness (Welford's algorithm), oscillation (DFT), spectral (SVD rank), optimizer (sign-SGD stub) - Tests: controller, population, fitness, optimizer (Google Test) - Benchmarks: evolve throughput, optimizer step (Google Benchmark) - Examples: simple optimization, PyTorch/libtorch integration - Python extension: pybind11 bindings with setup.py - README with architecture diagram and build instructions
28 lines
829 B
Python
28 lines
829 B
Python
from setuptools import setup
|
|
from torch.utils.cpp_extension import BuildExtension, CppExtension
|
|
|
|
setup(
|
|
name="fces_native",
|
|
version="0.1.0",
|
|
description="High-performance C++ FCES optimizer (Python bindings)",
|
|
ext_modules=[
|
|
CppExtension(
|
|
name="fces_native",
|
|
sources=[
|
|
"fces_native.cpp",
|
|
"../src/config.cpp",
|
|
"../src/controller.cpp",
|
|
"../src/population.cpp",
|
|
"../src/fitness.cpp",
|
|
"../src/evolution.cpp",
|
|
"../src/spectral.cpp",
|
|
"../src/oscillation.cpp",
|
|
"../src/optimizer.cpp",
|
|
"../src/telemetry.cpp",
|
|
],
|
|
include_dirs=["../include"],
|
|
),
|
|
],
|
|
cmdclass={"build_ext": BuildExtension},
|
|
)
|