Codelets: One Source for Device-Side Asynchronous Execution and Synchronous Fallback

CUDA-like languages make data-parallel kernels convenient, but their conventional asynchronous interface is host-driven: host code launches kernels and enqueues memory operations into streams, records events, and synchronizes at an appropriate boundary. When a device-resident controller discovers fine-grained work dynamically, conventional device-side control code is commonly synchronous; applications that need an asynchronous task model on the device typically introduce a custom task runtime and manage task descriptors and argument storage explicitly. This paper presents codelets, an extension to a CUDA-like heterogeneous C/C++ model that introduces an asynchronous codelet function kind. A designated device-resident controller thread executing ordinary device control code dispatches codelets with explicit dependence handlers, constructing a device-resident dependency graph, and later joins it through ac_start, which completes the graph work required by its selected handler and reconnects codelet execution to the controller's synchronous control flow. Compiler-generated stubs marshal arguments from a synchronous activation record into a runtime-managed invocation context and reconstruct them at the codelet entry. The same source can also execute synchronously, subject to data-race and side-effect restrictions. We present the programming model, its argument transfer and control-flow correctness discipline, its extension to multiple controllers, and the implementation support needed to realize it.

Authors

Publication Details

Published
2026-11-26
DOI
https://doi.org/10.66977/xsci.2611.004w
Primary Topic
Parallel Computing and Optimization Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Codelets: One Source for Device-Side Asynchronous Execution and Synchronous Fallback

Hao Liu, Jiangning Liu
Parallel Computing and Optimization Techniques
preprint

Codelets: One Source for Device-Side Asynchronous Execution and Synchronous Fallback

Hao Liu, Jiangning Liu
preprint en

Abstract

CUDA-like languages make data-parallel kernels convenient, but their conventional asynchronous interface is host-driven: host code launches kernels and enqueues memory operations into streams, records events, and synchronizes at an appropriate boundary. When a device-resident controller discovers fine-grained work dynamically, conventional device-side control code is commonly synchronous; applications that need an asynchronous task model on the device typically introduce a custom task runtime and manage task descriptors and argument storage explicitly. This paper presents codelets, an extension to a CUDA-like heterogeneous C/C++ model that introduces an asynchronous codelet function kind. A designated device-resident controller thread executing ordinary device control code dispatches codelets with explicit dependence handlers, constructing a device-resident dependency graph, and later joins it through ac_start, which completes the graph work required by its selected handler and reconnects codelet execution to the controller's synchronous control flow. Compiler-generated stubs marshal arguments from a synchronous activation record into a runtime-managed invocation context and reconstruct them at the codelet entry. The same source can also execute synchronously, subject to data-race and side-effect restrictions. We present the programming model, its argument transfer and control-flow correctness discipline, its extension to multiple controllers, and the implementation support needed to realize it.

Parallel Computing and Optimization Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon