Could Mojo's optimisations (such as kernel fusion) help to optimise general data science workloads? #1478
-
If I understand correctly, the main use-case for kernel fusion is for deep learning: Say we have a matrix multiplication followed by a ReLU. Kernel fusion should automatically create a "fused matmul + ReLU" operation. Could kernel fusion also optimise general data science workloads (which aren't necessarily part of an ML pipeline)? For example, I work with satellite images. I often need to perform a sequence of operations on satellite imagery such as:
Could kernel fusion "fuse" these sorts of tasks? More generally: Does Mojo offer performance advantages over C / C++ / Rust for these types of workload? 🙂 Thanks loads! I'm excited to see how Mojo progresses! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
When I asked a similar question on the Discord about using Mojo for data science (and asked about some features I'd like for similar workflows), the impression I got is they're not interested in data science or scientific/numerical computing. If that's correct, I think PyTorch, Julia, or JAX would be a better fit. However, you're 100% correct that kernel fusion is very important to performance in general data science workloads (and is implemented as part of Julia's broadcasting system). There's not really a computer-level distinction between numerical computing and ML--both tend to need the same kinds of optimizations. |
Beta Was this translation helpful? Give feedback.
-
It's definitely not correct to say "we aren't interested in data science or scientific/numerical computing" - of course we are, its a critical part of AI. So to make it very clear - yes, we are deeply interested in data science and numerical computing and would love to see Mojo grow here over time. I again implore you, please don't make this a "Mojo vs Julia" discussion - we've answered this question many times and you can see our thoughts here - https://docs.modular.com/mojo/faq.html#why-not-make-julia-better To answer @JackKelly original question - we'd encourage you to play with the MAX Engine (https://www.modular.com/max) when the Developer Edition arrives in Q1. You can load custom operations directly into the engine for fusion opportunities. |
Beta Was this translation helpful? Give feedback.
It's definitely not correct to say "we aren't interested in data science or scientific/numerical computing" - of course we are, its a critical part of AI. So to make it very clear - yes, we are deeply interested in data science and numerical computing and would love to see Mojo grow here over time.
I again implore you, please don't make this a "Mojo vs Julia" discussion - we've answered this question many times and you can see our thoughts here - https://docs.modular.com/mojo/faq.html#why-not-make-julia-better
To answer @JackKelly original question - we'd encourage you to play with the MAX Engine (https://www.modular.com/max) when the Developer Edition arrives in Q1. You can load custom o…