This document proposes a testing framework called Akari to port Intel x86 SIMD intrinsic functions to OpenPOWER systems and ensure correctness. Akari would generate random test values, run the Intel and OpenPOWER versions of intrinsics, and compare results. It would check for errors and exceptions. Akari could also measure performance. The framework would be written in C as a Python extension to allow testing on different systems over a network. Akari may help port intrinsics to other architectures like ARM. The goal is to build a study group and open source community around understanding intrinsics and the testing framework.
Developer Data Modeling Mistakes: From Postgres to NoSQL
Test SIMD Library Port to OpenPOWER With Akari Framework
1. Testing Framework to port and
optimize SIMD library to
OpenPOWER Systems
Daisuke Oka
daisukeokahassou@gmail.com
10/29/2021
2021年10月29日
2. Current Problem
• There are many SIMD Intel x86 Intrinsic function
• Intel Intrinsic function runs only on Intel, not on OpenPOWER Systems
• So we need to port Intel x86 Intrinsic code to OpenPOWER equivalent
Intrinsic code to run application by good performance on
OpenPOWER Systems
• But porting Intel x86 Intrinsics to OpenPOWER Intrinsics is technically
challenging
3. Obstacle of this project
• Intel x86 Intrinsics and OpenPOWER Intrinsics are not one to one
currespondance
• PowerISA vetor facility(VMX and VSV) are extensive but do not always
provide a direct or obvious equivalent to the Intel Intrinsics.
• Porting must be correct. Without error and error must lead to fatal
bug of application.
• If we can , we want to measure letency and throughput
5. Why we need testing framework
• Result of intrinsics of Intel x86 and OpenPOWER ISA must be equal
• If Error or Exception occurres , these must occurre in Intel x86 and
OpenPOWER ISA as same
• If result is not same, unexpected and unpredictable bug may be
occurre
• Not repuducable bug may be lead to fatal result
• So we must test Intel Intrinsic and correspondance of OpenPOWER
ISA automatically
• So we need testing framework
6. Testing Framework for _mm256_add_pd
• Throw same random __m256d value to Intrinsics in Intel x86 and
OpenPOWER Systems
• Ramdom value must be generated by CommonRandom__m256d()
function
• Compare return __m256d value of Intel x86 and OpenPOWER
Systems
• Return value must be compared by CommonAssert(__m256d value)
• Intel and OpenPOWER Systems must be connected by network
module written by Python
• Testing module will be written by C language extension of Python
7. Name of testing framework may be "Akari"
• "Akari" is Japanese orginary girl's name "あかり"
• Meaning "Light"
8. To port other architecture by using Akari
• Akari can be used to port Intel Intrinsics to other archtecture like ARM
• ARM has different Intrinsics too
• Need a few modification(I think)
• Need to run Python
9. Reference
• Linux on Power Porting Guide: Vector Intrinsics
• https://openpowerfoundation.org/?resource_lib=linux-power-
porting-guide-vector-intrinsics
• SLEEF: A Portable Vectorized Library of C Standard Mathematical
Functions(Naoki Shibata , Member, IEEE and Francesco Petrogalli
2020)
• https://sites.uclouvain.be/SystInfo/usr/include/avxintrin.h.html
10. We want to build study group and OSS
Community!
• Study group for understanding OpenPower ISA and Intel Intrinsics
• Community for Testing Framework