Skip to content

Instantly share code, notes, and snippets.

@mattwalsh
mattwalsh / maker.py
Created December 13, 2022 16:30
Matmul experiments
#!/usr/bin/python3
import sys
from string import Template
# fun defaults
M = 4
N = 3
K = 2
@mattwalsh
mattwalsh / matmul.py
Created January 31, 2023 02:41
IREE Python Matmul Tester
#!/usr/bin/python3
import sys
import os
import time
import re
import tempfile
import subprocess
import argparse
import numpy as np
from string import Template
@mattwalsh
mattwalsh / intrinsic_fun.cpp
Created March 29, 2023 00:18
Non-intrinsic vector library mini example
include <cstdlib>
#include <iostream>
#define FORCE_INLINE __attribute__((always_inline))
#define MASK_TRUE 0xffffffff
// our machine's vector length. This #defins is a bit naive in that the
// vector length would be a function of the datatype (e.g. on AVX512,
// you'd have 16 floats but only 8 double's
#define VLEN 16
#!bin/python
# main YouTube I learned from: https://www.youtube.com/watch?v=g2BRIuln4uc
# down the rabbit hole from: https://jalammar.github.io/visualizing-neural-machine-translation-mechanics-of-seq2seq-models-with-attention/
import os
import sys
import numpy as np
import pandas as pd