5 ms·
I think the main problem for Mojo is that it really doesn't make the hard part of writing HPC code that much easier. Maybe a bit better than C++ (ex. better com
by cyber_kinetist 2y ago
I think the main problem for Mojo is that it really doesn't make the hard part of writing HPC code that much easier. Maybe a bit better than C++ (ex. better compile-time metaprogramming, built in SIMD type) - but you still have to do the dirty work of writing the optimized SIMD kernels, which isn't going to be sexy given the nature of the problem. (Also... CUDA support when?)
I think the main advantage of Mojo would be its tight integration with the Python ecosystem (can conveniently call Python from Mojo)... Given the atrocities with existing C/C++ build systems, guess this could be a much lower barrier for deep learning people to delve into HPC stuff?
- neonsunset 2y agoWriting SIMD routines can be quite easy, at least much more pleasant than using intrinsic mnemonics. My understanding is that Mojo's portable SIMD builds on top of LLVM vector MLIR dialect, which is good. If this is indeed true, it would make it competitive with C# cross-platform SIMD which usually means just creating variables typed as Vector128/256/512<T> and using either the regular arithmetic operators on them or VectorXXX.Shuffle/PairwiseSomething/etc. for SIMD-specific operations without ever touching mnemonics (those can be intermixed behind branches of if (Arm64?) if an ISA of your interest has a more specific instruction, and these still consume the same vector types). Example: https://github.com/dotnet/runtime/blob/7ffb9a44ab32cd96d5684c1560671695535ae2cb/src/libraries/Common/src/System/HexConverter.cs#L259-L322 https://github.com/dotnet/runtime/blob/7ffb9a44ab32cd96d5684... Even higher level abstraction can be built on top of that, e.g. Triton or ISPC style (just no one has done that yet, it's a relatively new addition to the language, the closest one is System.Numerics.Tensors which is C#'s own baby BLAS). I'm very interested in Mojo as it seems like one of the few options where moving away from C# wouldn't be a huge downgrade, giving all the performance bits while being built on top of LLVM, for now waiting until it is fully open-sourced and becomes a public project.
- cupofc0t 2y agoMojo doesn't use most of built-in dialects, they currently only use LLVM and Index dialect, as well as many custom dialects