Ever since I heard about Mojo I (and presumably most other people) thought it would be a good language to speed up functions to be called from Python. Everyone knows that vanilla Python can be slow, but one of the reasons that Python programs can be reasonably fast in practice is because Python often leans on libraries written in more performant languages, predominantly C/C++, but increasingly also Rust. Until recently, there has been no real way to call Mojo code from Python, but about a mon...| fnands
An engineer’s perspective on multi-sensor foundation models.| fnands.com
The day has finally arrived. Well actually, the day arrived in February, but who’s counting. The Mojo language has finally publicly released the ability to do GPU programming - if you have a reasonably modern NVIDIA GPU. Luckily for me, I have an RTX 3090, and although it isn’t officially supported, it is basically an A10, which is. Looking at some of the comments on the nightly releases, it does seem that AMD support is on the way as well. The Modular team publicly released the ability t...| fnands
In a previous post on parsing PNG images in I very briefly mentioned cyclic redundancy checks, and posted a rather cryptic looking function which I claimed was a bit inefficient. In this post I want to follow up on that a bit and see how we can speed up these calculations. For reference, this post was done with Mojo 24.5, so a few language details have changed since my last post (e.g. math.bit got moved to the top-level bit and a few of it’s functions have been renamed). I actually wrote m...| fnands
This past weekend I participated in a AI hackathon organized by Factory Network and {Tech: Berlin} with my friends Axel Nordfeldt and Jonathan Nye. The sponsors were Mistral, Weaviate and LumaAI, meaning we had a bunch of fun credits to play around with. I’m an ML engineer, but I haven’t had that much exposure to the world brave new world of AI engineering that consists of calling LLM API’s and prompt engineering, so I wanted to use the hackathon as a way to get a better understanding o...| fnands
A lot has changed in Mojo land since I last had a look. The last time I wrote one of these Mojo was at version 0.6, and now it’s at 24.2! This is just due to a change in version numbering, so they have basically still kept the pace of about one new version per month, so the releases (ignoring bugfix releases) goes 0.6 -> 0.7 -> 24.1 -> 24.2. Why 24.1/24.2? Modular have moved to a YY.MAJOR.MINOR numbering scheme, so 24.1 and 24.2 are the first and second releases (under this naming scheme) i...| fnands
Many earth observation satellites are equipped with a higher resolution panchromatic sensor, and a lower resolution multispectral sensor. One example of this is the Pleiades satellite constellation by Airbus, for which the panchromatic sensor has a 70 cm ground sampling distance (GSD), and the multispectral sensor has a 2.8 m GSD, i.e. four times lower than the panchromatic band. The panchromatic band is sensitive to a wide spectrum of light, usually overlapping with several of the other spe...| fnands
Another month, another Mojo release. I am busy doing the 2023 edition of the Advent of Code (AoC) in Mojo, and had a few complaints 😅. If you not familiar with the AoC, it’s basically a coding advent calendar that gives you a new coding challenge every day for the first 25 days of December. In a bit of foreshadowing, I used an AoC 2022 puzzle in my first post on Mojo, which was using Mojo 0.2.1, and it is encouraging to see how far the language has come. The AoC puzzles are often pretty ...| fnands
Another month, another Mojo release! It feel like every time I run into a missing feature in Mojo it gets added in the next version: In my first post I complained about a lack of file handling, which was then added soon after in version 0.4.0. For version 0.4.0 I ran into the issue that you can’t print Tensors, which has now been added in the 0.5.0 release. So this means Mojo has now unlocked everyone’s favourite method of debugging: printing to stdout. In addition to that, Tensors can no...| fnands
As Mojo is an extremely new language I want to keep track of the development, and try to learn the language as it evolves. I had a first look at version 0.2.1 of the language in a blog post a few weeks back, and while on vacation I decided I should probably try and write a blog post every time the Modular team releases a new Mojo update (at least every minor update, not patches). To my surprise, in the two weeks I was offline the Modular team managed to do two minor releases, so I’ll jump s...| fnands
I’ve been working a lot recently with stereo vision and wanted to go through the basics of how disparity is calculated. I’m partially doing this as an excuse to get better at Julia (v1.9.3 used here). You can view the notebook for this blog post on Github: Introduction In much the same way that we as humans can have depth perception by sensing the difference in the images we see between our left and right eyes, we can calculate depth from a pair of images taken from different locations, c...| fnands
A quick look| fnands.com
A PNG parser in (pure-ish) Mojo| fnands.com