Slide 1

Slide 1 text

Pelemay Updates Susumu Yamazaki (ZACKY) Co-creator of Pelemay Co-organizer of ElixirConf JP Associate Professor @Univ. of Kitakyushu 1 © 2020 Susumu Yamazaki

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

What’s Pelemay? 3 © 2020 Susumu Yamazaki

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

BTW, if you’re interested in Nerves, you may feel sad because… 5 © 2020 Susumu Yamazaki

Slide 6

Slide 6 text

“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

Slide 7

Slide 7 text

Pelemay Updates 7 © 2020 Susumu Yamazaki

Slide 8

Slide 8 text

Demos, and Performance Evaluation 8 © 2020 Susumu Yamazaki

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

14 © 2020 Susumu Yamazaki > mix pelemay.bench ModuleName > mix pelemay.nerves.bench ModuleName

Slide 15

Slide 15 text

15 © 2020 Susumu Yamazaki > mix pelemay.bench ModuleName > mix pelemay.nerves.bench ModuleName

Slide 16

Slide 16 text

Future work: Supporting CUDA 16 © 2020 Susumu Yamazaki

Slide 17

Slide 17 text

•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

Slide 18

Slide 18 text

Adoption and Supporters Status 18 © 2020 Susumu Yamazaki

Slide 19

Slide 19 text

•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

Slide 20

Slide 20 text

Our vision 20 © 2020 Susumu Yamazaki

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Epilogue 22 © 2020 Susumu Yamazaki

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

– 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.