Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mr-user13524y@24th-Dragon
I agree Python is the best programming language to develop AI in but is it the best language to deploy over? I never deploy an AI before so just asking. -
CurtisMJ4684yPython if you just want to plug things together (not a bad thing), otherwise any language that compiles to machine code with a good compiler backend like GCC or LLVM(like C or Rust) because it can usually auto vectorize to AVX/NEON instructions which you will use a lot in AI.
-
Choose a library, not a language. Then choose a language that can interface with the library. You don't want to be writing low level linear algebra code when developing an AI.
Python with PyTorch/Tensorflow etc. are good options for DL based AI.
For stuff like game AI, C++ is probably a better bet because of its efficiency and you have tons of low level data structures and algorithms libraries, because game AI relies on a lot of fast data structure manipulation which C++ is good at (or find a Python/whatever library for it, personally don't know any but they have to be there)
@CurtisMJ for deep learning type workloads that's a definite nope unless you're doing some niche optimization. Autovectorized code will almost always be crappier than hand tuned library (Eigen/MKL/etc.) code because there's a lot more to high performance programming than vectorization (eg. cache optimizations). Python with one of those libraries would shred everything but the most exquisitely optimized C/C++/Rust/Go etc. code, and if you're going that deep you're usually reimplementing the library anyway. -
CurtisMJ4684y@RememberMe Fair call on auto-vectorization being kinda crappy. Just figured I'd get a mention in for SIMD instructions because in my experience re-implementing the library is literally what some people wanting to learn this stuff want to do. High performance programming is indeed a rabbit hole but its a good rabbit hole to know your way around when youre interested in the deeper mechanics of AI, even if you're just going to let a library handle it. Even those libraries can make mistakes sometimes. Some people aren't interested. Thats fine, they can use Python.
-
@CurtisMJ true, but AI and HPC are kind of orthogonal skills (good to have both for sure but practical constraints like time). The AI researchers I know don't bother with low level details like computation, they do algorithms and deep network architecture and so on. Computation is handled by experts who make said libraries (generally, they just use an existing library). It's just because of the massively increased productivity this offers.
But sure if you want to learn both, by all means go ahead. Implementing stuff from scratch is fun. -
CurtisMJ4684y*desperately tries to delete high performance AI library that I've been working on for the last 6 months from Github*
If I ever pluck up the courage to actually make that repo public I am so going to link this rant lol. -
@CurtisMJ don't let me stop you, lol
It's cool stuff and definitely worth learning about. -
Root825994yAny language at all, a nice randomizer, and millions of years of patience.
If you're particularly patient, you might get a copy of yourself!
Best programming language for developing an AI
question