3 ms·
Both. See https://github.com/uncomplicate/bayadera https://github.com/uncomplicate/bayadera too. Whatever the language, you have to make function calls to cuDN
by dragandj 6y ago
Both. See https://github.com/uncomplicate/bayadera https://github.com/uncomplicate/bayadera too.
Whatever the language, you have to make function calls to cuDNN, because cuDNN is optimized by Nvidia, which put serious resources into it. Even if you wrote everything in C++/CUDA, you probably can't match it for the standard stuff.
The custom things that I write, I prefer to write in CUDA kernels + Clojure management code.
Clojure kernels are technically possible in the same way as Julia or whatever kernels are possible, but the thing is that you have to match low-level hardware features anyway, so CUDA C/C++ just makes more sense for kernels, which are tiny part of code anyway.
- p1esk 6y agoSo if you have to use cuda c/c++, then why not do it from python?
- dragandj 6y agoNo. You don't use cuda/c++ as it is used from Python. You use cuda/c only in kernels. That is compiled dynamically, in process, from Clojure funcion calls, and 95% of related code is the management code, which is written in Clojure. There is no separate C++ build. You never touch any C++ tools such as CMake or anything. You work dynamically from the Clojure REPL.
- p1esk 6y agoAs a Pytorch user, I never touch c/cuda code. I never touch cmake. I can work dynamically from python repl. So, again, why should I care how those c/cuda calls are made if I don’t see them?
- pjmlp 6y agoBecause Clojure comes with a platform that supports AOT/JIT compilation out of the box, has several state of the art GC algorithms and in the near future even value types, while offering the same dynamism as Python, with all the capabilities of a Lisp in code manipulation.
- smabie 6y agoBecause Python is an ugly, inexpressive, and incredibly verbose language.