Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pelemay Updates

Pelemay Updates

Pelemay version up to 0.0.13 has been continuously released by mid-May 2020! It can compile in parallel Enum.map with integer and/or float calculation or String.replace into native code with SIMD instructions. Speedup ratio from Enum is 2.25x to 4.48x! Pelemay works well on x86_64 and ARM architectures. It also works well on Nerves! This talk shows the achievements of Pelemay with demonstrations, and the near future milestone of it.

Susumu Yamazaki (ZACKY)

June 18, 2020
Tweet

More Decks by Susumu Yamazaki (ZACKY)

Other Decks in Programming

Transcript

  1. Pelemay Updates Susumu Yamazaki (ZACKY) Co-creator of Pelemay Co-organizer of

    ElixirConf JP Associate Professor @Univ. of Kitakyushu 1 © 2020 Susumu Yamazaki
  2. About Questions •Don’t hesitate to ask any questions and/or discussion.

    •But, because I’d like to focus on my presentation during it, please write questions into Q&A of Pelemay Updates in Whova, and I’ll answer them via Whova, later. •I’m looking forward to your questions and discussion! 2 © 2020 Susumu Yamazaki
  3. What’s Pelemay •Pelemay is a native compiler for Elixir, which

    generates SIMD instructions. It has a plan to generate for GPU code. https://github.com/zeam-vm/pelemay •Supported Platforms: •x86_64 and ARM / macOS, Linux and Nerves •Sorry, as regards macOS, Pelemay 0.0.13 works only on Catalina, because I haven’t fixed an issue of it on up to Mojave, yet. •To fix it requires to adopt a tool like autoconf to compile code depended on platforms. •Elixir 1.9 to 1.10 / OTP 20 to 22 •I haven’t tested Pelemay on OTP 23, yet.  © 2020 Susumu Yamazaki
  4. BTW, if you’re interested in Nerves, you may feel sad

    because… 5 © 2020 Susumu Yamazaki
  5. “I had want to watch Scenic talk by Boyd…” Yes,

    me too! It’s a serious problem for many Nerves engineers. I hope the movie of Scenic will be published, as soon as possible… 6 © 2020 Susumu Yamazaki
  6. Integer Calculation First, I’ll show 1. an example code of

    Pelemay that calculates a list of integers enough much by a logistic map, and 2. results by Benchfella that indicates Pelemay is twice faster than Enum. 9 © 2020 Susumu Yamazaki
  7. Float Calculation Next, I’ll show 1. an example code of

    Pelemay to multiply each float element of a list by 2, and 2. results by Benchfella that indicates Pelemay is 1.7x faster than Enum. 10 © 2020 Susumu Yamazaki
  8. String Replace Next, I’ll show 1. an example code of

    Pelemay to replace each substring “Fizz” of a list with “Buzz”, and 2. results by Benchfella that indicates Pelemay is 3.9x faster than Enum. 11 © 2020 Susumu Yamazaki
  9. Execution on Nerves Next, I’ll show 1. an example code

    of combination of Nerves and Pelemay that multiply each float of a list by 2, 2. that Pelemay can be run on the host and RasPi 4, and 3. generated C and assembly codes for x86_64 and ARM 12 © 2020 Susumu Yamazaki
  10. New feature: Microbenchmarking Last, I’ll show a new feature, which

    shows results of linearization by least squares of microbenchmarking that measures execution time per an iteration of each kernel in a specified module with clock-cycles and nano sec. Unfortunately, this feature causes the above-mentioned issue to prevent macOS up to Mojave from compiling. 13 © 2020 Susumu Yamazaki
  11. •I’ve already implemented a prototype of Pelemay, which drives CUDA,

    though it had less performance than I expected, due to overhead of transferring data between CPUs and GPUs. •But, I have many ideas to improve it. •I started to discuss some of ideas with •Akash Hiremath (an author of Exile) •Graham Leva (working on bringing Nerves to NVIDIA’s embedded devices) •Issac Yonemoto (an author of Zigler), and Hideki Takase (an author of Cockatrice and RclEx) •We’ve just proposed a new working group “External Process Communication, Interface and Robustness” to Erlang Ecosystem Foundation, in order to realize a brand new FFI, faster than NIFs, as safe as Port. •And thanks for stating to join us! •Jeff Grunewald (an author of Stargate), and Hans Elias J. and Sonny Scroggin (co-authors of Rustler) •I’d like to start to discuss this in the new working group as soon as possible! Future work: Supporting CUDA 17 © 2020 Susumu Yamazaki
  12. •Several corporations and organizations have a strong interested in Pelemay

    and its future potential and collaborate with and support us in various ways. Thank you a lot! •They hope to enable Elixir to realize computation- intensive or number-crunching applications, including image and 3D processing, and machine learning. •Thus, I’ll research and develop Pelemay in order to fit it with their needs, with proposing brand-new features, which will make you surprised sure! Adoption and Supporters Status 19 © 2020 Susumu Yamazaki
  13. Our vision of Pelemay •Pelemay = The Penta (Five) “Elemental

    Way”: Freedom, Insight, Beauty, Efficiency and Robustness. •Supporting CUDA is aimed at efficiency as well as freedom and insight. •Pelemay also makes Elixir code beautiful. •It will keep Erlang and Elixir robust, too.  © 2020 Susumu Yamazaki © Susumu Yamazaki and Yuki Hisae, ElixirConf US 2019 https://youtu.be/uCkPyfFhPxI
  14. I had a plan, at ElixirConf EU “Real” on March:

    •2019 was the year of the 100th anniversary of the establishment of the diplomatic relations between Poland and Japan! •In that year, I met José for the first time at Lonestar ElixirConf 2019, where I made my first memorial presentation to the Elixir community out of Japan. •How MIRACLE it is!  © 2020 Susumu Yamazaki © Susumu Yamazaki, Lonestar ElixirConf 2019 https://youtu.be/lypqlGlK1So
  15. I had a plan, at ElixirConf EU “Real” on March:

    •How MIRACLE it is! •So, I decided to attend ElixirConf EU 2020 “Real” on March to state congratulations, by announcing ElixirConf JP 2020, but you know this plan couldn’t be carried out… •Even though so, I’d just made this presentation to celebrate it. •And, to say the following words to all of you…  © 2020 Susumu Yamazaki © ElixirConf JP
  16. – E.T. (1982) “I’ll be right here…” 25 © 2020

    Susumu Yamazaki This message is quoted from the last scene of E.T., which describes parting. I found it becomes more important to us nowadays than before coronavirus, because it expresses an emotion “I’d like to stand close to you, even though we’ll be separated”. It’s my message for all of you, from far away Japan. Thank you and see you again! I’m looking forward to meeting you next time, in REAL! Thank you, again.