Pelemay (formerly Hastega) - Challenge for GPGPU on Elixir!

Do you want to learn and use machine learning in Elixir / Phoenix / Nerves apps? Of course, you can, but the machine learning is written in Python and invoked from Elixir via ErlPort… Of course, you can implement some machine learning algorithms in Elixir. However, they have no computational power enough to execute real applications. We wish Elixir could have more computational power!

This may change by Hastega! Hastega will make a series of code fragments of pipelined Enum.map to be transformed into optimized native code using GPUs and/or CPUs with SIMD instructions.

I wrote a post of Medium on Hastega:

https://medium.com/@zacky1972/hastega-challenge-for-gpgpu-on-elixir-intend-to-apply-it-to-machine-learning-691c3560d179?source=friends_link&sk=9e56cc0a10940ea8a9299cdf47448c21


Original unveiling/discussion can also be found here: LoneStar Elixir 2019 - anyone go? - #2 by gregvaughn

16 Likes

‪I’ve just published a new Medium on Hastega (will be renamed)‬

‪https://medium.com/@zacky1972/hastega-will-be-renamed-concludes-not-to-adopt-to-be-implemented-using-high-performance-erlang-d29666f93b69

Have a fun!

6 Likes

Sorry, but I can not open that link… I always end up beeing redirected to https://medium.com/.

worked fine here… https://medium.com/@zacky1972/hastega-will-be-renamed-concludes-not-to-adopt-to-be-implemented-using-high-performance-erlang-d29666f93b69

2 Likes

Really?
I wrote the same URL to the post on SNSs, which works well…

Thank you for your additional explaination!!!

1 Like

I’ve just revised the URL. Thank!

I’ve said it before but will say it again, can’t wait to hear more about Hastega - keep up the good work! :023:

2 Likes

Just discovered Hashtega and it sounds really exciting. Any news?

1 Like

Here’s some info: ElixirConf 2019: Return of Wabi-Sabi: Hastega Will Bring More and More Computational Power to Elixir - Susumu Yamazaki, Yuki Hisae

5 Likes

Pelemay 0.0.6 has been released!

A new feature of this release is to support String.replace.

defmodule M do
require Pelemay
import Pelemay

defpelemay do
def string_replace(subject) do
String.replace(&1, “Fizz”, “Buzz”)
end

def enum_map_string_replace(list) do
  list
  |> Enum.map(& String.replace(&1, "Fizz", "Buzz"))
end

end
end

This code is 4x faster than original Elixir code.

StringReplaceBench

benchmark name iterations average time
Pelemay String.replace 1000000 1.20 µs/op
Enum String.replace 500000 3.92 µs/op
Flow String.replace 5000 678.27 µs/op

I wrote an article:

https://medium.com/@zacky1972/pelemay-0-0-6-has-been-released-string-replace-becomes-4x-faster-cebeeaf3fe5b?sk=cbab126e2adfc95c7f79ca4c0aeb45c3

12 Likes