错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Inference with Transformer Encoders on ARM and RISC-V Multicore Processors

  • Héctor Martínez,
  • Francisco D. Igual,
  • Rafael Rodríguez-Sánchez,
  • Sandra Catalán,
  • Adrián Castelló,
  • Enrique S. Quintana-Ortí

摘要

We delve into the performance of transformer encoder inference on low-power multi-core processors from two perspectives: First, we conduct a detailed profile of the inference process for two members of the BERT family on a modern multi-core processor, identifying the main bottlenecks and opportunities for improvement. Second, we propose a number of accumulative optimisations for their primary building blocks. For that, we elaborate our own implementation of the general matrix multiplication (GEMM), which dynamically tunes several key parameters yielding relevant performance gains for transformer encoders. Additionally, we introduce a number of strategies to also improve the parallel execution of the transformer block. Our implementations for ARMv8a and RISC-V multi-core processors with SIMD units, taking as a reference state-of-the-art GEMM implementations (BLIS for ARM and OpenBLAS for RISC-V) reveal accelerations of up to \(2.5\times \) for natural language processing tasks.