Future Possibilities and Effectiveness of JIT from Elixir Code of Image Processing and Machine Learning into Native Code with SIMD Instructions

Search this article

Description

Nx is a multi-dimensional tensor library for Elixir with multi-staged compilation to the CPU or GPU, which is similar to NumPy and TensorFlow in Python. Nx is expected to be applied in image processing and machine learning. Code used by them in C is often optimized for CPUs into native code with SIMD instructions. In this presentation, we'll show that native code with SIMD instructions is 1000x+ faster than equivalent Elixir code with Nx, to evaluate future possibilities and effectiveness of such code generation and optimization. One of our future works is to implement code generation into BeamAsm, which is a JIT for Erlang VM, which is the backend of Elixir, though it doesn't generate SIMD instructions, now.

Nx is a multi-dimensional tensor library for Elixir with multi-staged compilation to the CPU or GPU, which is similar to NumPy and TensorFlow in Python. Nx is expected to be applied in image processing and machine learning. Code used by them in C is often optimized for CPUs into native code with SIMD instructions. In this presentation, we'll show that native code with SIMD instructions is 1000x+ faster than equivalent Elixir code with Nx, to evaluate future possibilities and effectiveness of such code generation and optimization. One of our future works is to implement code generation into BeamAsm, which is a JIT for Erlang VM, which is the backend of Elixir, though it doesn't generate SIMD instructions, now.

Journal

Details 詳細情報について

Report a problem

Back to top