RSSAmplifier

Blog

Sasank Chilamkurthy

Code. Books. Languages.

/RSS feed ↗20 posts

Latest posts

Something Personal: Customer Obsession

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...

Something Personal

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...

Intermediate Representations for GPUs: LLVM Does Not Cut it

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...

SYCL: A Portable Alternative to CUDA

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...

PortBLAS: Open Source BLAS that is Performance-Portable Across GPUs

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...

How Common Lisp Met C++

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 ...

Foreign Function Interfaces, or How to Expose C Functions in Scheme

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...

Installing Drivers and Libraries for Intel Arc GPUs on Ubuntu

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...

Intermediate Representations in Compilers: SSA is Functional Programming

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 ...

Intermediate Representations in Compilers: Static Single Assignment (SSA)

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...

Hardware Design for LLM Inference: Von Neumann Bottleneck

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...

Scheme Compiler in Incremental Steps: Procedures

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...

Scheme Compiler in Incremental Steps: Heap Allocation

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 ...

Scheme Compiler in Incremental Steps: Conditional Expressions

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...

Scheme Compiler in Incremental Steps: Local Variables

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...

Scheme Compiler in Incremental Steps: Binary Primitives

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...

Scheme Compiler in Incremental Steps: Unary Primitives

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...

Scheme Compiler in Incremental Steps: Immediate Constants

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 ...

Scheme Compiler in Incremental Steps: Compiling Integers

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 Strategy From First Principles

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...