Mojo – a new programming language for AI developers
11–20 of 272 posts
Re: Mojo – a new programming language for AI developers
#12This looks quite interesting with big names behind it. I'd love to see a comparison vs Julia though, which I think tried to tackle some of the same problems.
Oh, I guess that's one big philosophical difference.
Re: Mojo – a new programming language for AI developers
#13This looks quite interesting with big names behind it. I'd love to see a comparison vs Julia though, which I think tried to tackle some of the same problems.
Edit: just saw this is a project by Chris Latner and Tim Davis. Hahaha ... that's immediate credibility.
Re: Mojo – a new programming language for AI developers
#14This looks quite interesting with big names behind it. I'd love to see a comparison vs Julia though, which I think tried to tackle some of the same problems.
I was thinking about Julia too. I guess they will try to make it reasonably compatible with Python directly making rewrites easier than Julia? Edit: just saw this is a project by Chris Latner and Tim Davis. Hahaha ... that's immediate credibility.
Re: Mojo – a new programming language for AI developers
#15This looks quite interesting with big names behind it. I'd love to see a comparison vs Julia though, which I think tried to tackle some of the same problems.
I was thinking about Julia too. I guess they will try to make it reasonably compatible with Python directly making rewrites easier than Julia? Edit: just saw this is a project by Chris Latner and Tim Davis. Hahaha ... that's immediate credibility.
Re: Mojo – a new programming language for AI developers
#16This looks quite interesting with big names behind it. I'd love to see a comparison vs Julia though, which I think tried to tackle some of the same problems.
julia> using LoopVectorization, BenchmarkTools, Test
function AmulB!(C,A,B)
@turbo for n = indices((C,B),2), m = indices((C,A),1)
Cmn = zero(eltype(C))
for k = indices((A,B),(2,1))
Cmn += A[m,k]*B[k,n]
end
C[m,n]=Cmn
end
end
M = K = N = 144; A = rand(Float32, M,K); B = rand(Float32, K,N); C0 = A*B; C1 = similar(C0);
AmulB!(C1,A,B)
@test C1 ≈ C0
2e-9*M*K\*N/@belapsed(AmulB!($C1,$A,$B))
96.12825754527164
I'm able to achieve 96GFLOPs on a single core (Apple M1) or 103 GFLOPs on a single core (AMD EPYC 7502). And that's not even as good as what you can achieve using e.g. TVM to do the scheduling exploration that Mojo purports to do.Perhaps they have more extensive examples coming that showcase the capabilities further. I understand it's difficult to show all strengths of the entire system in a short demonstration video. :)
EDIT: As expected, there are significantly better benchmarks shown at https://www.modular.com/blog/the-worlds-fastest-unified-matr... so perhaps this whole discussion truly is just a matter of the demo not showcasing the true power of the system. Hopefully achieving those high performance numbers for sgemm is doable without too much ugly code.
Re: Mojo – a new programming language for AI developers
#17Well, I'm blown away. If this succeeds, it will allow you to use Python for the entire AI stack: high-level model composition (as usual), fast compiled CPU code (instead of, say, libs written with C++), and on-device operations (instead of, say, libs that use CUDA). Oh, and it will make your Python code parallel (i.e., there's no GIL). Obviously, we'll have to wait until Mojo is production-ready, but I'm excited afte…
Re: Mojo – a new programming language for AI developers
#18I’m a bit confused.
Re: Mojo – a new programming language for AI developers
#19[FWIW, folks waiting for this should also look at Cython, which is different, but uses Pythonic syntax for more of a C-like semantics.]
Re: Mojo – a new programming language for AI developers
#20That said, Mojo is a completely different thing. It is aligned with the Python community to solve specific problems outlined here: https://docs.modular.com/mojo/why-mojo.html
Mojo also has a bunch of technical advancements compared to Julia by virtue of it being a much newer development and being able to learn from it (and Swift and Rust, and C++ and many many other languages). Including things like ownership and no GC. We also think there is room for a new language that is easier to deploy, scales down to small envelopes, works directly with the full Python ecosystem, is designed for ML and for MLIR from first principles, etc.
Julia is far more mature and advanced in many ways. Many folks have and will continue to push Julia forward and we wish them the best, it is a lovely ecosystem and language. There is room for more than one thing! :)
EDIT: Just in case there is any confusion, I work for Modular, built LLVM, Swift, Clang, MLIR and a variety of other things. I wasn't trying to misrepresent as being unaffiliated.