Professional profile
林柏諺
Senior Compiler Engineer @ MediaTek | Architecting NPU Compiler Backends | MLIR & GenAI Performance Optimization
Taiwan · 7 years of experience
Summary
I am a Senior Compiler Engineer with 5+ years of experience of NPU compiler backends architecture and performance optimization for MediaTek's flagship SoCs. At MediaTek, my key contributions include: * Leading the design and establishment of the compiler backend infrastructure, defining its IR and pass pipeline based on MLIR for NPU. * Delivering a breakthrough >1000x compile-time speedup for large-scale Gen-AI models, significantly accelerating our development cycle. * Engineering an optimization framework with intuitive APIs, enabling compiler engineers to collaborate more effectively and innovate faster. Beyond my core compiler work, I have extensive hands-on experience in compiler optimization for AI algorithm, covering everything from traditional CNNs to Camera, Video, and Generative AI. Since 2021, I have optimized over 20 AI models annually, either directly or by providing technical guidance to fellow engineers. I thrive on deep collaboration with hardware and algorithm teams to push system performance to its theoretical limits.
Experience
Senior Compiler Engineer · MediaTek
2023-06-01 – Present
Architected and led the development of NPU compiler backends for flagship Dimensity SoCs, significantly improving performance for key machine learning models. * Improved 3 video AI models FPS by 20% through tuning hardware deep fusion. * Reduced 2 AI models memory footprint by 68% through analyzing memory usage and adjusting execution order to reduce peek memory requirement. * Improved LLM decoding speed by 20% through analyzing to bottleneck and optimizing memory access to solve memory bandwidth issues. Developed and optimized MLIR-based compilation flows for Gen-AI models, resulting in a >1000x compile-time speedup and ~5x performance improvement for stable-diffusion v1.5. * Improved memory allocation speed and result 10x efficiency by refine cost function to allocate TCM. * Reduced memory allocation time complexity by O(E*d^2) to O(E*d) by observing of multi-core memory allocation results and making assumptions for designing greedy algorithms. Designed and established an optimization framework featuring intuitive APIs to accelerate collaborative development, which is widely used in the optimization of ETHZv6, MLPerf, and Gen-AI models. Collaborated closely with hardware architecture and algorithm teams to co-design and validate NPU features, ensuring seamless hardware-software integration and performance validation. * Provided compiler optimizations for 6 hardware features. * Identified and resolved 11 compiler crash / bit-true / build issues.
Compiler Engineer · MediaTek
2020-04-01 – 2023-06-01
Introduce MLIR into Mediatek's Neuron Compiler. Design the NPU's MLIR dialect and establish the compiler backend skeleton. Reduce compilation time from >10 hours to minutes by identifying and resolving a critical bug in the memory allocation algorithm. Conducted in-depth performance analysis and identified computational bottlenecks, leading to critical performance optimizations for key neural network models. * Improved ETHZv4 benchmark score by +40% through implement hardware deep fusion. * Improved a 4K video AI model FPS by +45% through resolving complex fusion failures in corner cases. * Improved LSTM FPS by 19% through refine multi-core strategy. Analysis tools for performance and debugging. * A visualization tool for locating bit-true issues. * A visualization tool for analyzing multi-core bubbles. * Designed report mechanism of compilation fusions and memory operations results.
Education
National Chiao Tung University
Master's degree · Computer Science
Skills
- MLIR
- Machine Learning
- LLM