Re:Building a Language and Compiler for Machine Learning
by KenoFischer on Monday December 03, 2018 @06:41PM
(#18594351)
Yes, Julia tends to be quite good at this kind of thing. Which level you want to operate at will depend on the details of the accelerator. Happy to give some pointers if you can give me a rough idea of the target architecture and what software already exists. My email is in my HN profile.
Re:Building a Language and Compiler for Machine Learning
by wallnuss on Monday December 03, 2018 @09:10PM
(#18595366)
Take a look at CUDAnative.jl (https://github.com/JuliaGPU/CUDAnative.jl) which uses the NVPTX LLVM backend to compile Julia code to the GPU. What you described sounds very similar to that and could definitely made to work.
Re:Building a Language and Compiler for Machine Learning
by byt143 on Monday December 03, 2018 @07:04PM
(#18594497)
I believe Julia has generic kernels for many linear algebra ops (like matrix multiply) that the compiler can use to generate code for different backends and types as a fallback to BLAS.
Re:Building a Language and Compiler for Machine Learning
by orbifold on Tuesday December 04, 2018 @02:33AM
(#18597141)
I would not dismiss C or C++ as viable avenues of progress. There are viable C++ / C only deep learning libraries https://pjreddie.com/darknet/, available that are easily ported and embedded C++ can be pretty pleasant to write. We currently use C++14 on a embedded Power processor with custom vector unit and 16kB of SRAM and it works like a charm.
One thing that comes to mind here: does Julia use some kind of primitives for various things like matrix multiplication that might be difficult to export at the LLVM-IR level?