Last year, around this time, I wrote about our marketing strategy. I feel similarly right now during the long Diwali break. My personal space has become decluttered, and I feel like writing again. I feel reflective and want to write about what’s a...
I opened the editor to write something deeply personal. I didn’t have an exact idea about what I wanted to write. I have a sense that I want to write about my new startup. How I feel about it. How I am putting my customers first. May be my marketi...
Compilers are like dragons, and wrapping my head around their complexity has been challenging. Adding to the challenge, I’ve chosen a particularly tough topic within this complexity: AI compilers. What sets AI apart are GPUs and matrix multiplicat...
As you probably know, many of AI frameworks depend on CUDA to make AI work on GPUs. CUDA is a language extension to C that only works for Nvidia GPUs. The industry recognizes this dependency and there is quite some work being done to create a port...
I’ve been focusing on AI inferencing hardware over the past few months. In an earlier post, I have described the optimal hardware design for LLM inference. In a recent post, I have touched upon how PyTorch is an interpreter over CUDA code. In fact...
I have tried guile and chicken scheme and I actually hated the FFI experience for the lack of documentation. I am not writing them off yet - Chicken still is so small and nice. But I have decided to try something new: Clasp. Clasp is a LLVM based ...
One of my biggest hit posts is how to call C functions from Lua. This feature is called as foreign function interface or FFI in short. In this post, I am going to show how to do FFI in Scheme. I will also add some wisdom to the mix :).FFI and Deep...
I’ve been working with Intel Arc GPUs for quite some time and want to document the driver and vendor library installation process in this tutorial. Unfortunately, installing these drivers neither is a single step nor are the packages small. My ult...
In the previous post, we spoke about an intermediate representation (IR) of code called single static assignment (SSA) and how variables are never overwritten in SSA. We saw LLVM IR – a very popular SSA IR for imperative languages – for different ...
Compilers are program translators – they translate program from one language to another while preserving the semantics. Usually the source language is higher level programming language like C++ or Java and the target language is machine level lang...
I was speaking to Prof. Veeresh Deshpande from IIT Bombay about optimal hardware system design for LLM inference. I explained to him how my ‘perfect’ hardware should have equal number of floating point operations per second (FLOPS) and memory band...
In this post, let us add procedures to our compiler. Procedures or functions are a basic building of any language – especially so with lisp because it was highly influenced by Alonzo Church’s lambda calculus. Lists and procedures/functions togethe...
A lisp is not a lisp if it doesn’t support lists! In this post, let’s implement complicated data structure like lists, strings, etc. These data structures don’t fit in single word like they did for integers, characters and others from our earlier ...
In this post, let’s implement conditional expressions: (if test conseq altern). This is simple to implement at assembly level. We need to employ two labels to transfer control to conseq or altern based on whether test is true. In scheme all values...
In the previous post, we added stack to our implementation of scheme. This allowed us to store intermediate results and therefore binary primitives like (+ a b). Since we now have stack, adding local variables should be straightforward. We will im...
In the previous post, we added unary primitives like add1 and null? to our language. In this post, let’s implement binary primitives like +, *, and char<?. We cannot, in general, use a single register because evaluating one argument may overwri...
In the previous step, we added immediate constants for integers, characters, booleans and empty list. We now extend the language to include calls to primitives that accept one argument. Let’s start with add1 and sub1 which are increment and decrem...
In the previous part, we compiled integers and created linker and runtime. In this part, we’ll add few more language features to our compilerCompile Immediate ConstantsIn scheme, we have values other than fixnum integers. We have immediate values ...
I somehow came to love compilers. May be it was my experience with PyTorch - after all it is some sort of interpreter/compiler combo which executed python code on GPUs. I figured that compilers are an underappreciated part of what makes computers ...
Marketing is an important part of any organization. It’s important that there’s a marketing strategy. It’s not complicated to have one because the fundamentals of customer behavior are well documented. My reference textbook is surprisingly not a m...