How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip
When OpenAI and Broadcom pulled the curtain back on Jalapeño—their custom AI inference accelerator—the hardware world didn't just notice the 13.4 petaflops of 4-bit compute or the massive 15.4 terabytes per second of memory bandwidth. They noticed the timeline. Going from architectural concept to first silicon in under twenty months, and screaming from Register Transfer Level (RTL) to tape-out in a blistering nine months, rewrote the playbook for Application-Specific Integrated Circuit (ASIC) development. Even more wild? They pulled it off partly by turning their own large language models loose on the design pipeline.
The Problem Everyone Ignores
Traditional chip design is a multi-year exercise in human suffering, legacy tooling, and brutal tape-out stress. Writing Verilog or SystemVerilog manually is notoriously slow, error-prone, and disconnected from the software layers that actually run on the silicon. When you are trying to optimize complex transformer kernels, memory hierarchies, and multi-head latent attention blocks, human engineers spend months manually tweaking routing and floorplans. By the time a traditional chip hits manufacturing, the frontier models it was designed to run have already evolved.
Above: High-level architecture overview of the topic covered in this article.
If you skip proper hardware-software co-design early in the cycle, you end up with expensive silicon that bottlenecks on data movement instead of actual math. Memory bandwidth starvation kills your token throughput, and your costly accelerators sit idle waiting for cache lines to sync. Most engineering teams try to brute-force this by adding more human headcount, which only introduces communication overhead and slows down velocity further. OpenAI faced a wall: how do you build custom silicon at the speed of modern software deployment without falling into the traditional multi-year hardware trap?
The answer required treating chip design less like traditional hardware engineering and more like an iterative software compiler problem. By leaning into high-level synthesis and letting frontier LLMs handle the tedious optimization loops, they bypassed traditional verification bottlenecks. If you are scaling infrastructure today, ignoring AI-assisted hardware workflows means you are moving too slow.
What Actually Works
The secret sauce behind the Jalapeño design velocity wasn't magic; it was a disciplined architecture built around Google's open-source XLS high-level synthesis toolchain. Instead of forcing engineers—or LLMs—to write raw, error-prone Verilog from scratch, OpenAI structured the frontend workflow around software-like languages such as DSLX and C++. Because large language models are fundamentally trained on vast amounts of software code, they excel at writing, refactoring, and optimizing C++ and domain-specific high-level synthesis scripts compared to traditional Hardware Description Languages.
Once the high-level logic was established, XLS compiled those software descriptions down into optimized RTL hardware descriptions. But the real breakthrough happened after the initial silicon simulation models were up and running. OpenAI pointed their own internal models—precursors to their advanced reasoning systems—at the generated benchmark software and raw kernel optimization loops. By treating hardware kernel tuning as an automated search problem guided by an LLM loop, they optimized complex routines like DeepSeek-style attention kernels from an abysmal 0.31 percent of theoretical peak performance all the way to 88.94 percent in roughly forty hours of continuous automated tuning.
Let's look at how you can set up a high-level synthesis verification wrapper in Python to interface with your simulation environment and test automated kernel generation pipelines before pushing them down to hardware synthesis tools.
import os
import subprocess
import json
from dataclasses import dataclass
@dataclass
class SynthesisConfig:
kernel_name: str
target_lang: str
optimization_level: int
max_clock_freq_mhz: float
def compile_hls_kernel(config: SynthesisConfig, source_path: str) -> bool:
"""Compiles a high-level synthesis source file using XLS toolchain bindings."""
if not os.path.exists(source_path):
raise FileNotFoundError(f"Source file {source_path} does not exist.")
build_command = [
"xls_builder",
f"--target={config.target_lang}",
f"--opt_level={config.optimization_level}",
f"--freq={config.max_clock_freq_mhz}",
f"--output_dir=build/{config.kernel_name}",
source_path
]
print(f"Initiating HLS compilation for kernel: {config.kernel_name}")
try:
result = subprocess.run(
build_command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
check=True
)
print(f"Successfully compiled {config.kernel_name}. Output:\n{result.stdout.strip()}")
return True
except subprocess.CalledProcessError as e:
print(f"Compilation failed for {config.kernel_name}:\n{e.stderr.strip()}")
return false
if __name__ == "__main__":
cfg = SynthesisConfig(
kernel_name="attention_gelu_core",
target_lang="dslx",
optimization_level=3,
max_clock_freq_mhz=1400.0
)
compile_hls_kernel(cfg, "kernels/attention_gelu.cc")
This script provides the foundational automation bridge needed to script automated compilation runs. By wrapping the HLS compiler in a structured configuration class, you allow an autonomous agent or optimization loop to systematically tweak parameters, measure performance outputs, and iterate rapidly without manual terminal intervention.
Step-by-Step: Let's Build It Together
Building an AI-assisted hardware design workflow requires breaking the traditional waterfall model into tight, automated feedback loops. We need a pipeline that takes a high-level mathematical description of an attention mechanism, translates it via an LLM agent, compiles it, and validates it against expected performance bounds.
First, we set up our automated agent prompt handler that interfaces with our model client to rewrite and optimize kernel definitions based on compilation feedback metrics.
import openai
from typing import Dict, Any
def optimize_kernel_via_llm(current_code: str, profiling_report: str) -> str:
"""Uses an LLM to refactor high-level hardware description code based on profiling metrics."""
client = openai.OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
system_prompt = (
"You are an expert hardware-software co-design engineer specializing in High-Level Synthesis (HLS) "
"and tensor core optimization. Refactor the provided DSLX/C++ code to maximize pipeline parallelism "
"and reduce memory bottlenecks based on the supplied profiling error report."
)
user_prompt = f"### Current Code:\n{current_code}\n\n### Profiling Report:\n{profiling_report}\n\nProvide only the updated code block."
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_prompt}
],
temperature=0.1
)
return response.choices[0].message.content
What just happened? We instantiated an automated feedback loop where our LLM reads the hardware profiling logs and directly patches the source code to address bottlenecks like memory stalls or unrolled loop inefficiencies.
Next, we need an execution harness that runs the generated simulator artifacts, measures execution latency against theoretical peak thresholds, and feeds the resulting metrics back into our optimization loop.
import time
import random
def run_hardware_simulation_harness(kernel_binary: str) -> Dict[str, Any]:
"""Simulates execution of the compiled kernel and returns performance metrics."""
print(f"Loading simulation binary: {kernel_binary}")
time.sleep(0.5) # Simulating binary load and setup time
# Simulating metrics gathered from hardware performance counters
simulated_cycles = random.randint(1200, 1500)
theoretical_peak_pct = round(random.uniform(75.0, 91.5), 2)
metrics = {
"status": "PASS",
"total_cycles": simulated_cycles,
"achieved_peak_percentage": theoretical_peak_pct,
"memory_bandwidth_utilization_gbps": 14200.5
}
print(f"Simulation completed. Achieved {theoretical_peak_pct}% of theoretical peak.")
return metrics
if __name__ == "__main__":
results = run_hardware_simulation_harness("build/attention_gelu_core/kernel.bin")
print(f"Final Captured Metrics: {results}")
What just happened? We executed a mock simulation harness that extracts real-time utilization stats, letting our pipeline programmatically evaluate whether the latest LLM-driven optimization pushed us closer to our performance target.
The Mistakes That Will Burn You
When you start implementing AI-driven hardware optimization or custom accelerator workflows, several subtle traps can tank your project before you ever reach tape-out.
- Mistake 1: Relying on LLMs to write raw Verilog directly. Frontier models hallucinate pin mappings and clock domain crossings when forced to write low-level HDLs directly, leading to catastrophic logic synthesis failures. Always route through a high-level synthesis toolchain like XLS.
- Mistake 2: Ignoring memory locality during kernel generation. If your optimized compute cores outpace your local HBM slice bandwidth, your expensive processing elements will spend most of their clock cycles starved of data.
- Mistake 3: Treating simulation benchmarks as absolute production truth. Simulated cycle counts often miss real-world physical thermal throttling and interconnect routing congestion. Always validate against physical layout timing closure reports before finalizing specs.
Production Checklist
Before you push your custom chip designs or high-performance inference pipelines toward manufacturing or large-scale cluster deployment, verify these critical items:
- Verify HLS toolchain stability: Ensure your high-level synthesis compiler versions are pinned to avoid silent regression bugs in generated RTL code.
- Audit memory access patterns: Confirm that your tensor layouts explicitly minimize global cross-core traffic and leverage local scratchpads.
- Never skip timing closure analysis: Ensure your physical backend routing meets clock frequency constraints across all operating voltage corners.
- Validate token throughput per watt: Measure power draw under realistic mixture-of-experts workloads rather than just peak theoretical FLOPs.
Key Takeaways
- Vertical Integration Wins: Controlling the stack from custom silicon up to the model architecture eliminates generic hardware inefficiencies and drastically drops cost-per-token economics.
- AI-Assisted Hardware Design: Utilizing LLMs via high-level synthesis toolchains compresses multi-year hardware development cycles down into months.
- Locality is Everything: Purpose-built inference ASICs like Jalapeño succeed by prioritizing memory bandwidth and data locality over general-purpose flexibility.
Engr. Hamza | AI & MLOps Engineer | Building autonomous systems at the edge of possibility


Top comments (0)