EUVIMEDEUVIMED entdecken
Open Access · CC BY-NC-ND 4.0

SmartDispatch: Dynamic Substitution of NumPy-Style APIs on Heterogeneous CPU-GPU Systems

Jinku Cui, Yueming Hao, Shuyin Jiao, Jiajia Li, Xu Liu

Proceedings of the ACM on Software Engineering · 30.06.2026 · 3 (FSE) · 4140-4160

DOI: 10.1145/3808189 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the ACM on Software Engineering, online erschienen am 30.06.2026. Verfasst von Jinku Cui und 4 weiteren Autor:innen. Die Arbeit nennt 15 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY-NC-ND 4.0). Gefördert von: National Science Foundation.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

The popularity of Python in various application domains has driven widespread adoption of NumPy-style APIs. To improve performance, libraries such as PyTorch, JAX, CuPy, and cuPyNumeric offer GPU-compatible counterparts to NumPy functions. However, substituting NumPy with these alternatives is not always beneficial due to the overheads of type conversion, data transfer, and kernel launch costs. We present SmartDispatch, a runtime framework that dynamically substitutes NumPy-style API calls with semantically equivalent implementations from other libraries to improve performance. Our system includes a knowledge base of equivalent APIs, a hardware-aware microbenchmarking component to identify substitution thresholds, and a runtime substitution tool. Evaluation on four platforms with varying CPU-GPU architectures using machine learning models from real-world benchmarks shows that consistent performance gains (1.3× to 5.8×) can be achieved without requiring code modification, demonstrating the effectiveness of cross-library substitution in heterogeneous environments.

Förderung

  • National Science Foundation

Zitieren

APA

Cui, J., Hao, Y., Jiao, S., Li, J., & Liu, X. (2026). SmartDispatch: Dynamic Substitution of NumPy-Style APIs on Heterogeneous CPU-GPU Systems. Proceedings of the ACM on Software Engineering, 3(FSE), 4140-4160. https://doi.org/10.1145/3808189

Vancouver

Cui J, Hao Y, Jiao S, Li J, Liu X. SmartDispatch: Dynamic Substitution of NumPy-Style APIs on Heterogeneous CPU-GPU Systems. Proceedings of the ACM on Software Engineering. 2026;3(FSE):4140-4160. doi:10.1145/3808189

BibTeX
@article{Cui2026,
  author = {Cui, Jinku and Hao, Yueming and Jiao, Shuyin and Li, Jiajia and Liu, Xu},
  title = {SmartDispatch: Dynamic Substitution of NumPy-Style APIs on Heterogeneous CPU-GPU Systems},
  journal = {Proceedings of the ACM on Software Engineering},
  year = {2026},
  volume = {3},
  number = {FSE},
  pages = {4140--4160},
  doi = {10.1145/3808189}
}
Kostenlos starten →