Fork me on GitHub
#uncomplicate
<
2019-12-03
>
sooheon04:12:04

Making my way through the DL4P book, realized that macos no longer supports opencl...

sooheon04:12:12

Is there any initiative to add Metal as another backend?

blueberry08:12:52

@sooheon.k I heard that they no longer develop it. Have they removed it completely now? Unfortunately, as macOS is usually used on laptops with underpowered GPUs, I haven't heard of anyone building a bridge to Metal to Java ecosystem, since CPU is as powerful as GPU there while being easier to program. Also, I haven't heard of anyone using Metal for compute, despite Apple pushing it while supressing CUDA and OpenCL.

blueberry08:12:47

@sooheon.k BTW how does the book work for you? Is it reasonably easy to follow?

sooheon08:12:23

@blueberry I'm enjoying the book very much. I tried to get into it a while back, had trouble understanding the stack, went away to land of python for a few months and now am seeing the reasoning behind things like how you build up the FullyConnectedInference type and its protocols.

sooheon09:12:52

as for opencl, the latest macbook pro is not on this list (https://support.apple.com/en-us/HT202823), and I'm getting CL_BUILD_PROGRAM_FAILURE trying to make a opencl-float factory. The gpus on the latest mbps are pretty solid, and I got the 8g version on the off chance that AMD for dl story improves in the next couple years (I've been hearing about ROCm as well)

sooheon09:12:41

dependign on how difficult you think the metal support would be, and whether you have time to mentor, I would be willing to volunteer time to learn your other implementations and help out if I can

blueberry09:12:49

@sooheon.k Thanks. Please feel free to share your experience and challenges, so I can improve parts that can be better. As for OpenCL, ROCm does support it, but I don't believe they support macOS. Even CUDA is being kicked off. Regarding the Metal thing, it might be feasible, and I'd be glad to mentor you on that path. Currently, I think the best bet would be to create Metal Java API based on javacpp (https://github.com/bytedeco/javacpp-presets/). This is not that difficult once one is comfortable with javacpp, but that is a high bar that requires at least familiarity with C++ and good control of low-ish level Java. With such API, creating ClojureMetal and the backend for Neanderthal would be lots of work but not that hard since it would be a direct port of existing engines, so the blueprint is there.

blueberry09:12:22

@sooheon.k An alternative is REPL over a ssh connection to a Linux machine with a good gpu, if you have access to one...

sooheon09:12:50

Thanks, yeah I will share more as I work through the book. Sad to hear there is not Metal Java API already, a little googling found this (https://mail.openjdk.java.net/pipermail/announce/2019-July/000271.html) but it's not public 😞.

sooheon09:12:16

@blueberry That's a good point, that's how I currently do my python workflow.

sooheon09:12:04

Intellij has a remote python repl functionality that is pretty seamless, I'll check to see if there's a way to make something similar for cursive repls, I think there might be

blueberry09:12:38

I'd be cautious with Java initiatives for this or that. If they had anything, they'd probably release at least a demo or hello world, or something like that...

sooheon09:12:14

yeah, Java and C++ is too many new things for me, I think it'd be better time spent experimenting on new nn architectures built on neanderthal

blueberry09:12:23

In Clojure, that should be even easier. If you have a ssh access to your machine, start your REPL there, and you can access remotely as if on the same machine, just knowing the IP address in your local network and the port number. That should not even be dependent on the specific editor that you use.

sooheon09:12:48

yeah thanks, that sounds like exactly what I need to do