Skip to content

Instantly share code, notes, and snippets.

View jroelofs's full-sized avatar

Jon Roelofs jroelofs

View GitHub Profile
@jroelofs
jroelofs / toy-reassociate-matmul.diff
Created April 15, 2020 16:11
Matrix-Matrix multiply chain re-association for MILR's Toy examaple
commit 8ad8f04b2c4abec358d69d45870e80f50e3ccc22
Author: Jon Roelofs <[email protected]>
Date: Tue Apr 14 16:23:13 2020 -0600
WIP: reassociate matrix-matrix multiply chains
diff --git a/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp b/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
index fafc3876db2..ee9a1205845 100644
--- a/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
+++ b/mlir/examples/toy/Ch7/mlir/ToyCombine.cpp
@jroelofs
jroelofs / json-diff.py
Last active July 31, 2020 18:08
JSON diff tool
#!/usr/bin/env python3
# Finds the structural diff of two json files, ignoring formatting
# changes that a normal diff would highlight.
import json
import sys
def usage():
@jroelofs
jroelofs / morris.cpp
Created May 17, 2020 16:20
Sandbox experimentation on Morris Traversal
#include <memory>
#include <iostream>
struct Tree {
int data;
std::unique_ptr<Tree> left;
std::unique_ptr<Tree> right;
Tree(int data,
std::unique_ptr<Tree> &&left,