[Paper Review] DNNFuser: Generative Pre-Trained Transformer as a Generalized Mapper for Layer Fusion in DNN Accelerators
DNNFuser proposes a one-shot, inference-based mapper using a pre-trained Transformer to automate layer-fusion optimization in DNN accelerators, achieving performance comparable to search-based methods while being 66x–127x faster. It generalizes across unseen hardware conditions and enables efficient transfer learning on new DNN workloads with minimal fine-tuning.
Dataflow/mapping decides the compute and energy efficiency of DNN accelerators. Many mappers have been proposed to tackle the intra-layer map-space. However, mappers for inter-layer map-space (aka layer-fusion map-space), have been rarely discussed. In this work, we propose a mapper, DNNFuser, specifically focusing on this layer-fusion map-space. While existing SOTA DNN mapping explorations rely on search-based mappers, this is the first work, to the best of our knowledge, to propose a one-shot inference-based mapper. We leverage Transformer as our DNN architecture to learn layer-fusion optimization as a sequence modeling problem. Further, the trained DNNFuser can generalize its knowledge and infer new solutions for unseen conditions. Within one inference pass, DNNFuser can infer solutions with compatible performance to the ones found by a highly optimized search-based mapper while being 66x-127x faster.
Motivation & Objective
- Address the lack of automated mappers for inter-layer map-space (layer-fusion), a largely unexplored dimension in DNN accelerator optimization.
- Overcome the high computational cost of existing search-based mappers (e.g., genetic algorithms, reinforcement learning) that require extensive exploration for optimal mapping.
- Enable fast, one-shot inference of optimal layer-fusion strategies without iterative search, improving deployment efficiency.
- Demonstrate generalization to unseen hardware conditions (e.g., varying on-chip buffer sizes) and transfer learning across diverse DNN workloads.
- Establish a new paradigm for DNN mapper design by modeling layer-fusion as a sequence modeling problem using Transformers.
Proposed method
- Model layer-fusion mapping as a sequence-to-sequence (seq2seq) problem, where the input is a DNN model’s layer configuration and hardware constraints, and the output is a fused layer configuration.
- Use a pre-trained Transformer architecture to learn the mapping from input DNN and hardware conditions to optimal layer-fusion patterns.
- Train the model on diverse DNN workloads (e.g., VGG16, ResNet18) to learn generalized knowledge of efficient layer fusion.
- Enable inference-based deployment: once trained, DNNFuser generates a solution in a single forward pass, eliminating the need for search.
- Apply transfer learning by fine-tuning the pre-trained DNNFuser on new DNN workloads (e.g., ResNet50, MobileNet-V2) with only 10% of the training epochs.
- Condition the model on on-chip buffer size to enable dynamic adaptation to runtime hardware constraints.
Experimental results
Research questions
- RQ1Can a pre-trained Transformer model effectively learn and generalize layer-fusion strategies across diverse DNN workloads and hardware conditions?
- RQ2How does the performance of a one-shot inference-based mapper (DNNFuser) compare to state-of-the-art search-based mappers in terms of solution quality and speed?
- RQ3To what extent can DNNFuser generalize to unseen hardware configurations, such as varying on-chip buffer sizes?
- RQ4Can transfer learning significantly reduce training time and improve performance when applying DNNFuser to new DNN models?
- RQ5Does the Transformer-based approach outperform RNN-based models (e.g., Seq2Seq) on longer sequences, such as deeper networks like ResNet18?
Key findings
- DNNFuser achieves inference-time mapping with 66x–127x speedup over state-of-the-art search-based mappers while maintaining comparable performance.
- On ResNet18, DNNFuser outperforms the RNN-based Seq2Seq baseline due to its superior handling of longer sequences, demonstrating the advantage of Transformers in sequence modeling.
- DNNFuser generalizes to unseen hardware conditions: it produces valid and efficient mappings for new on-chip buffer sizes without retraining.
- Transfer learning enables fine-tuning on new DNN workloads (e.g., ResNet50, MobileNet-V2) with only 10% of the training epochs required for training from scratch, achieving performance on par or better than direct training.
- The pre-trained general mapper achieves compatible performance to G-Sampler on VGG16 and outperforms it on ResNet18, validating its effectiveness across diverse architectures.
- The model learns to fuse deeper layers more aggressively due to smaller activation sizes and synchronizes off-chip when memory pressure increases due to activation shape or channel depth changes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.