• 3 min read

How AI helped speed up our AI

Blog Main

At Aurora Solar, we build AI tools so that solar installers don’t have to — tools that turn aerial imagery into accurate 3D roof models in under a minute. But building AI is only half the job. We also have to make sure it’s fast, reliable, and getting better over time. This post is about one of those behind-the-scenes improvements: how we used AI-assisted development to make AI SmartRoof 30% faster.

Setting the stage

Problem: Our accuracy-improvement project for AI SmartRoof required running the computer-vision pipeline on thousands of roofs. At roughly 10 seconds per roof, each evaluation run took hours, making iteration painfully slow.

Solution: After profiling the inference pipeline – timing each stage to find the bottlenecks – we used AI coding tools to generate a prioritized list of optimizations. We reviewed, tested, and shipped two quick wins:

  • Cached positional encodings so they’re reused when the input size doesn’t change
  • Enabled PyTorch automatic mixed precision (AMP) so that calculations that are safe to run in half-precision (FP16) do so automatically

Result: A 30% runtime reduction for AI SmartRoof. A design that used to take 60 seconds now finishes in ~40, and our evaluation loop is one-third faster.

What is AI SmartRoof?

AI SmartRoof is Aurora Solar’s computer-vision pipeline – a sequence of deep-learning models – that automatically generates roof models and detects obstructions from aerial and satellite imagery. With AI SmartRoof, a full 3D roof model can be created in less than a minute instead of drawing every edge by hand. Every second we shave off inference time directly improves the experience for installers and the speed at which our engineering team can iterate.

Why speed mattered

We kicked off a major accuracy-upgrade project for AI SmartRoof that required running the pipeline on thousands of roofs per evaluation. At ~10 seconds per roof, a single evaluation could take hours, and we needed many of them. Iteration speed became a real bottleneck.

Shaving even a couple of seconds per roof would tighten the feedback loop and let us test more ideas per week.

How we found and fixed the slow parts

Finding the slow parts first

We added timing measurements to each major stage of the AI SmartRoof pipeline. Two clear areas for optimization jumped out: We were recomputing the same positional encodings on every forward pass even when the spatial shape hadn’t changed, and a couple of dense fully-connected layers near the end of the model were consuming more time than expected.

Asking AI to speed things up

We fed these profiling results and the relevant code into our AI coding tools, asking for ideas to speed things up. The result was a prioritized list of optimization suggestions. We vetted them against our profiling data and selected two low-risk, high-impact changes: caching positional encodings and enabling automatic mixed precision (AMP).

# 1. Cache positional encodings

if self.cached_encodings is None or spatial_shape != self.cached_shape:

    encodings = self._merge_dims([...])

    self.cached_encodings = encodings

    self.cached_shape = spatial_shape

# 2. Automatic mixed precision

with torch.autocast(device_type="cuda"):

    out = self.backbone(x)

Validating the gains

The first change reduced runtimes by 20%, and the second by another 10%. Crucially, neither change affected output quality — the roof models were identical before and after.

What 30% faster means

For installers: every AI SmartRoof request completes 30% faster. A roof model that previously took 1 minute now takes ~40 seconds.

For our engineering team: experiment cycles are 30% shorter, letting us test more ideas per week and ship improvements sooner.

Why this worked

AI coding tools didn’t invent anything exotic here. The real value was in pairing disciplined profiling — knowing where the time was going — with AI that could quickly scan the code and spot optimizations we’d overlooked: a caching opportunity and a GPU precision setting. The human judgment was in choosing which suggestions to trust, validating them, and shipping with confidence.

This reflects how we think about AI-assisted development more broadly at Aurora: AI accelerates the work, but engineers own the decisions.

What’s next?

The AI & Geo team is always looking for ways to improve the accuracy and speed of AI SmartRoof. With the rapid evolution of AI-assisted development tools, we can iterate faster and explore more ambitious optimizations. The 30% speedup was just the first round — there are more improvements in the pipeline.

Ready to learn more?