> For the complete documentation index, see [llms.txt](https://docs.genesisconductor.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.genesisconductor.io/api-reference/docs/tensorneat_cuda_investigation.md).

# TensorNEAT CUDA / GPU Integration Investigation

**Date**: 2026-08-01\
**Context**: ADEPT + Genesis Conductor + diamondnode HyperNEAT embedding compressor\
**Target Hardware**: diamondnode\@192.168.1.228 (GTX 1650)

## Summary

TensorNEAT (EMI-Group) is a JAX-based library that provides full GPU acceleration for NEAT, CPPN, and HyperNEAT. CUDA support is entirely delegated to JAX — no custom CUDA kernels are required.

* Repo: <https://github.com/EMI-Group/tensorneat>
* Paper: TensorNEAT: A GPU-accelerated Library for NeuroEvolution of Augmenting Topologies (ACM, 2025)
* Reported speedup: up to 500× vs classic NEAT-Python

## Installation (diamondnode)

```bash
# JAX with CUDA 12
pip install -U "jax[cuda12]"

# TensorNEAT
pip install git+https://github.com/EMI-Group/tensorneat.git

# Optional multi-device via EvoX (JAX branch)
pip install "git+https://github.com/EMI-Group/evox@v0.9.1-dev"
```

## HyperNEAT Pattern

```python
from tensorneat.pipeline import Pipeline
from tensorneat.algorithm.neat import NEAT
from tensorneat.algorithm.hyperneat import HyperNEAT, FullSubstrate
from tensorneat.genome import DefaultGenome
from tensorneat.common import ACT

substrate = FullSubstrate(
    input_coors=...,   # geometric coordinates of source dims + bias
    hidden_coors=...,
    output_coors=...,  # target compressed dimensions
)

neat = NEAT(
    pop_size=512,          # tune for 4 GB VRAM
    species_size=20,
    genome=DefaultGenome(
        num_inputs=4,      # coordinate query size
        num_outputs=1,     # connection weight
        output_transform=ACT.tanh,
    ),
)

algorithm = HyperNEAT(
    substrate=substrate,
    neat=neat,
    activation=ACT.tanh,
    activate_time=10,
    output_transform=ACT.sigmoid,
)
```

## GTX 1650 Constraints

* 4 GB VRAM → keep population moderate (256–1024)
* Pre-truncate Gemini embeddings to 768D (or lower) before evolving
* Monitor temperature < 89.6 °C and entropy < 2.1 bits/sec (η\_thermo envelope)
* Use `nvidia-smi` + automatic maru reframe on thermal violation

## Recommended Next Steps

1. Install JAX + TensorNEAT on diamondnode
2. Adapt `gc-hyperneat-embedding-compressor-v0.1.py` to real `FullSubstrate` + `HyperNEAT`
3. Evolve 768D → 256D (or 128D) compressor with cosine-similarity fitness
4. Register successful compressor as AAL task type `evolve_hyperneat_compressor`
5. Feed into TAE routing layer / Yennefer thermodynamic reports

## Status

* Local NumPy demo: ✅ Completed (best fitness ≈ 0.9867)
* TensorNEAT + CUDA: Pending diamondnode execution
* Artifacts committed to GitHub and uploaded to Google Drive

Kingdom BUIDL — @igor-holt


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.genesisconductor.io/api-reference/docs/tensorneat_cuda_investigation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
