Search arXiv⌕ Search

arXiv · 2611.22844

How well does graph superoptimization transfer? Adapting tensor-graph superoptimizer to a Triton-based NPU

Abstract

For automatic optimization systems, performance portability across increasingly diverse AI accelerators remains a challenge. We investigate how well graph-level superoptimization transfers across architectures by adapting Mirage from its CUDA-oriented design to the Huawei Ascend 910B3 through a Triton-based compilation stack. We evaluate the adapted system on transformer-relevant workloads, including matrix multiplication, softmax, RMSNorm+MatMul, gated MLP, FNN, and attention. The results show that graph-level optimization can successfully transfer and outperform available reference implementations by up to 87.0% on fused workloads. However, performance is highly dependent on tensor shape and workload structure, with substantial regressions for other configurations. We identify target-specific tensor partitioning, execution-resource modeling, backend lowering and fusion, and search and verification costs as key limitations. Our findings demonstrate that a portable graph representation and programming model do not imply a portable optimization space, motivating modular target-specific mechanisms within otherwise reusable compiler infrastructure.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Weronika Hryniewska-Guzik, Mateusz Comblik, Daniel Murawski, Jakub Schmiegel, Maciej Świetlik, Maciej Kokociński, Tadeusz Kobus. 2026-11-17. How well does graph superoptimization transfer? Adapting tensor-graph superoptimizer to a Triton-based NPU. https://searcharxiv.org/abs/2611.22844

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

Held While Waiting: What LLM Agent Sessions Reserve on Serverless and Agent Runtimes

LLM agents spend nearly all their time waiting for the model. On Amazon Bedrock AgentCore, our agents waited a median of 2.7 seconds for each model reply, then computed for an estimated 5 to 40 milliseconds. AgentCore does not charge for CPU during the wait. But it reserves a separate environment, a virtual machine with its own memory, for every conversation, and keeps it reserved until the conversation is closed. So 1,000 conversations reserve 1,000 environments to do the work of 2 to 15 processor cores. A service runs out of environments long before it runs out of processing power. The shortage has two causes, and each has a fix. An environment stays reserved after its conversation ends: in the customer-service benchmark we ran, a conversation lasts 33 seconds on average, but its environment is held for 15 minutes more unless the client closes it. And an environment serves only one conversation, which is mostly waiting: in our simulation, 64 conversations sharing one environment need 59 times fewer environments, and 99 of every 100 replies are delayed by at most 40 milliseconds. The milliseconds are an estimate because they are hard to measure: a stubbed model, a timer around the model call, and steps run back to back each gave a plausible number that was too low. We show how to avoid all three. Of the two fixes, closing needs only the client. Sharing needs the platform, and of the agent runtimes we surveyed only one allows it, in part. They keep conversations apart because an agent runs tools, and sometimes code, chosen by a model. The open problem is to keep them apart without reserving an environment for each while it waits.

cs.PF↗

Recovering Parallelism under Fixed Numerical References in Quantized LLM Decoders

Preserving a quantized decoder's complete output scores and committed state can constrain projection arithmetic and attention views at different query granularities. Applying attention's finest partition to the entire decoder then fragments projection work that is already compatible with the numerical reference. We implement local lowering that retains admitted projection groups, refines physical views inside attention, and rejoins outputs in logical query order. Owned output rows, state commit, and guarded graph reuse carry the result into successive transactions. Complete-vector and active-state comparisons match the bound references in the exercised cases. At a selected 32B A5000 crossing with frozen proposals, local lowering reduces verification-through-commit time by 21.56% across 12 paired time blocks (95% CI [20.21%, 22.83%]). Independent complete-request studies evaluate few-column execution and prefill packing under their own controls. Few-column execution reduces RTX request time by 15.80% relative to grouped scalar execution in a descriptive comparison; packing admitted groups accelerates both target-only and speculative requests. Scalar regrouping alone has verification savings offset by prefill costs. Natural-workload studies further show that sparse opportunities, sampling, drafting, and setup can limit or reverse the service benefit. These results support enforcing each numerical obligation at its required operator and state boundary, then evaluating the retained work over the complete request and deployment lifetime.

cs.PF↗

Measuring and Charging for Retained Context in Long-Context LLM Services

Long-context large language model (LLM) services charge for repeated context, yet billing weights need not reflect its contribution to answer quality. We present a three-layer framework separating content relevance, observable proxies and auditable positional weights. Context-ablation experiments show that relevance dominates position and that distance-decay families do not outperform a relevance-only baseline. A measured serving stack shows that cache hits reduce repeated-prefix compute cost by over two orders of magnitude at 65,536 tokens, while cold resends constrain sustainable discounts. Cross-provider measurements separate cache value from tokenisation and list-price differences. Calibrated simulations reduce the 99th percentile of session charges by 31-42%, although revenue-matched nonlinear tariffs achieve similar reductions and median charges increase. The framework provides a bounded per-token accounting rule and measured deployment constraints, rather than a validated utility estimator.

cs.PF↗