@techreport{oai:ipsj.ixsq.nii.ac.jp:00211880, author = {川上, 健太郎 and 栗原, 康志 and 山崎, 雅文 and 本田, 巧 and 福本, 尚人 and Kentaro, Kawakami and Kouji, Kurihara and Masafumi, Yamazaki and Takumi, Honda and Naoto, Fukumoto}, issue = {12}, month = {Jul}, note = {筆者らは,スーパーコンピュータ富岳上でのディープラーニング (DL) 処理を高速化するため,CPU 向け DL 処理ライブラリの oneDNN を Fujitsu A64FX 向けに移植,最適化している.富岳は Armv8-A アーキテクチャに準拠した Fujitsu A64FX を CPU として搭載している CPU ベースのスーパーコンピュータである.一方,oneDNN は Intel が x86_64 アーキテクチャ向けに開発し OSS 化している DL ライブラリである.oneDNN は,計算カーネル部分の実行コードを動的に生成する機能を持つ.実行コードの動的生成機能は,x86_64 アーキテクチャ向け Just-In-Time (JIT) アセンブラの Xbyak を用いて x86_64 命令の粒度で実装されている.oneDNN を A64FX 向けに移植するためには,これを Armv8-A アーキテクチャ向け JIT アセンブラの Xbyak_aarch64 を用いて Armv8-A 命令に書き換える必要がある.しかし,これは書き換え対象のステップ数が数万行以上あり困難である.本稿では Xbyak を用いて x86_64 アーキテクチャ向けに生成した実行コードを Armv8-A アーキテクチャ向けの実行コードに変換するバイナリトランスレータの Xbyak_translator_aarch64 を紹介する.Xbyak_translator_aarch64 により,oneDNN を A64FX に移植する際にソースコードを書き換える作業がほぼ不要となり,oneDNN の A64FX 向けの移植開発効率を改善できる., To accelerate deep learning (DL) processing on the supercomputer Fugaku, the authors have ported and optimized the oneDNN for Fujitsu A64FX. The oneDNN is the DL processing library developed by Intel for the x86_64 architecture as an open-source software. Fujitsu A64FX is the CPU that complies with the Armv8-A architecture. The oneDNN dynamically generates the execution code of the computation kernels, which are implemented at the granularity of x86_64 instructions using Xbyak, the Just-In-Time (JIT) assembler for x86_64 architecture. To port the oneDNN to A64FX, it needs to be rewritten into Armv8-A instructions using Xbyak_aarch64, the JIT assembler for the Armv8-A architecture. This is difficult, because the number of steps to be rewritten is more than several tens of thousands of lines. In this paper, Xbyak_translator_aarch64 is introduced. Xbyak_translator_aarch64 is the binary translator that convert the executable code dynamically generated for the x86_64 architecture into the executable code for the Armv8-A architecture at runtime. Xbyak_translator_aarch64 eliminates the need to rewrite the source code for porting oneDNN to A64FX and enables us to port the oneDNN for A64FX in a short time.}, title = {AArch64 CPU向けディープラーニングライブラリ開発を加速するバイナリトランスレータ}, year = {2021} }