An Application Binary Interface (ABI) is a low-level contract that defines how compiled machine code interacts with an operating system, libraries, and other binaries. It specifies critical details like calling conventions for function arguments and return values, the memory layout of data structures, system call numbers, and object file formats like ELF. This ensures binary compatibility, allowing separately compiled modules—such as a program and a vendor runtime library—to interoperate correctly without access to source code.
Glossary
Application Binary Interface (ABI)

What is Application Binary Interface (ABI)?
A foundational specification for low-level software compatibility and hardware acceleration.
In the context of hardware acceleration, such as for a Neural Processing Unit (NPU), the ABI is essential for integrating vendor-provided binaries. A vendor SDK delivers pre-compiled libraries that adhere to a specific ABI, governing how an application passes tensor data, launches kernels, and manages device memory via a driver API. The ABI also defines the mapping for hardware intrinsics and the layout of ELF sections containing accelerator code, enabling the linker to correctly build a final executable that can leverage specialized silicon.
Core Components of an ABI
An Application Binary Interface (ABI) is the low-level contract between compiled machine code and its execution environment. For NPU programming, the ABI defines how kernels interact with the accelerator's hardware and software stack.
Calling Convention
The calling convention is a fundamental ABI rule that dictates how functions pass arguments, return values, and manage the stack and registers during a subroutine call. For NPU kernels, this defines how host CPU code invokes an accelerator kernel and how data pointers are passed.
- Key Aspects: Specifies which registers are caller-saved vs. callee-saved, the order of arguments (e.g., passed in registers R0-R3, then on the stack), and stack alignment requirements.
- NPU Relevance: A vendor's NPU driver and runtime enforce a specific calling convention for kernel launches. Mismatches between the compiler's expectation and the runtime's implementation cause catastrophic crashes.
Data Structure Layout & Alignment
This component specifies how data types (structs, unions, arrays) are arranged in memory, including byte ordering (endianness), alignment boundaries, and padding. Consistency is critical for data exchange between host CPU and NPU.
- Packing: Defines if struct members are packed tightly or aligned to natural boundaries (e.g., a 4-byte
intaligned to a 4-byte address). - Impact: An NPU kernel expecting a tightly packed struct of
floatvalues will read garbage data if the host compiler pads the struct differently. Vendor SDK header files define standard data types with explicit alignment attributes (e.g.,__attribute__((aligned(16)))).
Object File Format
The ABI specifies the binary container format for compiled code and data, such as ELF (Executable and Linkable Format) or Mach-O. This format organizes the executable into sections (.text, .data, .rodata) and contains metadata for linking and loading.
- Sections: The
.textsection holds executable machine code (the NPU kernels),.dataholds initialized global variables, and symbol tables (.symtab) map names to addresses. - NPU Toolchains: Vendor-specific compilers (a key part of the vendor toolchain) generate object files in a format the NPU's loader and runtime can parse. The linker (guided by a linker script) combines these into a final binary image loadable by the vendor runtime.
System Call Interface
For NPUs integrated into an OS-managed system, the ABI defines the mechanism for user-space code to request services from the kernel driver, such as memory allocation or kernel submission. This is often implemented via a Driver API.
- Mechanism: Typically involves issuing a specific software interrupt or using a special instruction (like
SVCon ARM) that traps into the kernel. The driver then validates the request and communicates with the NPU hardware. - Example: An application calls
npucalloc()from the Vendor SDK, which internally makes a system call to the driver to allocate device-accessible memory, adhering to the defined ABI for parameter passing.
Name Mangling & Symbol Encoding
Name mangling (or decoration) is a compiler technique for encoding function and variable names with additional information (like argument types) into a single symbol string in the object file. This enables features like function overloading in C++ and ensures unique symbols for linking.
- ABI Role: The mangling scheme is part of the ABI. Different compilers (or versions) using different schemes cannot link objects together.
- NPU Development: When using a C++ Vendor SDK, the mangled kernel names in the host code must exactly match the symbols exported by the NPU-compiled kernel object. Mismatches result in "undefined symbol" linker errors.
Exception Handling & Unwinding
This ABI component defines the mechanism for propagating runtime error conditions (exceptions) and for unwinding the call stack during error recovery or debugging. For NPU programming, this often relates to host-side error reporting from the accelerator.
- Frame Unwinding: Specifies how to walk back through the stack frames to find exception handlers, using unwind tables or specific frame pointer registers.
- NPU Context: If an NPU kernel encounters a hardware fault (e.g., illegal instruction), the vendor runtime must translate this into a host-side signal or exception that conforms to the host OS ABI, allowing the application to handle it gracefully.
How ABI Enables NPU Acceleration
The Application Binary Interface (ABI) is the critical low-level contract that allows compiled machine code to execute correctly on a specific hardware and operating system combination. In the context of Neural Processing Unit (NPU) acceleration, the ABI defines the precise rules for how host CPU code interacts with the NPU's specialized runtime and kernels.
An Application Binary Interface (ABI) is a system-level specification that dictates how compiled binary code interacts with an operating system and hardware. It defines calling conventions, system call mechanisms, register usage, and data structure layout in memory. For NPU acceleration, the ABI ensures that function calls from the host CPU to the vendor runtime and submitted compute kernels adhere to the NPU's expected binary format and execution model, enabling seamless integration.
This low-level contract is essential for binary portability and performance. A stable ABI allows pre-compiled vendor libraries and optimized kernels from an SDK to link and run correctly with an application, regardless of the compilation environment. It governs how parameters are passed to NPU kernels, how memory buffers are shared between CPU and NPU address spaces, and how execution synchronization occurs, forming the foundational layer for reliable hardware acceleration.
Frequently Asked Questions
The Application Binary Interface (ABI) is the foundational contract between compiled machine code and its execution environment. This FAQ clarifies its critical role in hardware acceleration, system compatibility, and low-level software development.
An Application Binary Interface (ABI) is a low-level specification that defines how binary machine code interacts with an operating system, hardware, or other compiled libraries. It works by establishing a precise contract covering calling conventions (how function arguments are passed and values returned), system call mechanisms, data structure layout and alignment in memory, register usage rules, and object file formats (like ELF or Mach-O). This contract ensures that separately compiled modules—such as a main application and a vendor's NPU runtime library—can correctly link and execute together, even if they were built with different compilers, as long as they adhere to the same ABI. For NPU programming, the ABI dictates how host CPU code calls into accelerator kernels and exchanges data buffers.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The Application Binary Interface (ABI) is a foundational specification enabling binary interoperability. Its concepts are tightly coupled with other low-level components of the hardware acceleration stack.
Calling Convention
A core component of an ABI that defines the low-level protocol for function calls. It specifies:
- Register usage: Which CPU registers are used to pass arguments and return values.
- Stack management: How the call stack is framed, who cleans up arguments (caller vs. callee).
- Preserved registers: Which register states must be saved and restored by the called function.
For NPUs, a separate kernel launching convention often exists within the vendor runtime, defining how kernel arguments are marshaled to the accelerator.
Vendor ISA
The Instruction Set Architecture defined by a hardware vendor for their specific processor or accelerator (e.g., an NPU). The ABI is built on top of the ISA. Key relationships:
- The ISA defines the raw instructions (e.g.,
VADD,TMMUL). - The ABI defines how those instructions are organized into callable functions, how data is structured in memory for them, and how control is transferred.
- Compiler intrinsics map high-level functions to specific ISA instructions, adhering to the ABI's rules for parameter passing and register usage.
ELF Sections & Relocation
The Executable and Linkable Format (ELF) is the standard container for binaries, and its structure is dictated by the ABI.
- .text section: Contains the executable machine code (ISA instructions).
- .data & .bss sections: Hold initialized and uninitialized static data, with layout rules defined by the ABI.
- Relocation: The process where the linker adjusts symbolic addresses in the code (e.g.,
call printf) to absolute memory addresses. The ABI specifies the relocation types and formats the linker must use, which differ between architectures (e.g., RISC-V vs. ARM).
Static vs. Dynamic Linking
The ABI governs how code modules are combined, which is critical for using vendor libraries.
- Static Library (.a): Object code archived into a library. Linked at compile-time; the library code is copied directly into the final executable. Requires ABI compatibility at link time.
- Dynamic Library (.so / .dll): Linked at runtime. The executable contains PLT (Procedure Linkage Table) and GOT (Global Offset Table) entries, as defined by the ABI, to resolve function addresses when the program loads. This allows sharing a single vendor runtime library (e.g.,
libvx_runtime.so) among many applications.
Cross-Compiler & Toolchain
A cross-compiler is essential for NPU development, generating code for a target NPU (e.g., ARM-based accelerator) on a different host machine (e.g., x86). The entire vendor toolchain (compiler, assembler, linker) must implement the target's ABI correctly.
- The compiler's code generator must emit instructions following the vendor ISA and the calling convention.
- The linker must understand the target's ELF format and relocation types.
- The vendor SDK provides these tools, headers, and libraries that are all ABI-compliant for the specific hardware.
Hardware Abstraction Layer (HAL)
While the ABI is a binary contract, a HAL is a source-level interface. The HAL provides a uniform API to hardware-specific features, but its implementation is where ABI details are handled.
- A vendor's HAL driver will contain inline assembly or compiler intrinsics that conform to the NPU's ABI for low-level register access.
- It translates high-level API calls (e.g.,
hal_memcpy_to_device) into sequences of commands that respect the driver's Driver API, which itself has an ABI for system calls or kernel-mode interactions.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us