Saved in:
Bibliographic Details
Main Authors: Yuan, Xiulong, Yan, Xu, Shen, Wenting, Qiu, Xiafei, Wang, Ang, Zhang, Jie, Li, Yong, Lin, Wei
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2412.16985
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917876347174912
author Yuan, Xiulong
Yan, Xu
Shen, Wenting
Qiu, Xiafei
Wang, Ang
Zhang, Jie
Li, Yong
Lin, Wei
author_facet Yuan, Xiulong
Yan, Xu
Shen, Wenting
Qiu, Xiafei
Wang, Ang
Zhang, Jie
Li, Yong
Lin, Wei
contents Recent deep learning workloads exhibit dynamic characteristics, leading to the rising adoption of dynamic shape compilers. These compilers can generate efficient kernels for dynamic shape graphs characterized by a fixed graph topology and uncertain tensor shapes. However, memory optimization, although particularly crucial in this large model era, remains relatively underexplored for dynamic shape graphs. The fundamental challenge lies in the lack of precise tensor shapes which are essential in conventional methods such as operation scheduling(op scheduling) and rematerialization. To address this challenge, we propose op scheduling and rematerialization approaches based on symbolic shapes and developed BladeDISC++. Besides, since rematerialization decisions cannot be made solely at compile time when tensor shapes are unknown, BladeDISC++ employs a compilation-runtime combined strategy to optimally address shape dynamics. Evaluations indicate that BladeDISC++ effectively reduces memory usage for dynamic shape graphs, achieving memory consumption comparable to optimizations using precise shapes, thereby promoting the broader adoption of dynamic shape compilers.
format Preprint
id arxiv_https___arxiv_org_abs_2412_16985
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle BladeDISC++: Memory Optimizations Based On Symbolic Shape
Yuan, Xiulong
Yan, Xu
Shen, Wenting
Qiu, Xiafei
Wang, Ang
Zhang, Jie
Li, Yong
Lin, Wei
Distributed, Parallel, and Cluster Computing
Recent deep learning workloads exhibit dynamic characteristics, leading to the rising adoption of dynamic shape compilers. These compilers can generate efficient kernels for dynamic shape graphs characterized by a fixed graph topology and uncertain tensor shapes. However, memory optimization, although particularly crucial in this large model era, remains relatively underexplored for dynamic shape graphs. The fundamental challenge lies in the lack of precise tensor shapes which are essential in conventional methods such as operation scheduling(op scheduling) and rematerialization. To address this challenge, we propose op scheduling and rematerialization approaches based on symbolic shapes and developed BladeDISC++. Besides, since rematerialization decisions cannot be made solely at compile time when tensor shapes are unknown, BladeDISC++ employs a compilation-runtime combined strategy to optimally address shape dynamics. Evaluations indicate that BladeDISC++ effectively reduces memory usage for dynamic shape graphs, achieving memory consumption comparable to optimizations using precise shapes, thereby promoting the broader adoption of dynamic shape compilers.
title BladeDISC++: Memory Optimizations Based On Symbolic Shape
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2412.16985