Skip to content

Instantly share code, notes, and snippets.

View tlkahn's full-sized avatar
🥫

JG tlkahn

🥫
View GitHub Profile
@tlkahn
tlkahn / fast_conway_mlx.py
Created August 31, 2024 02:12 — forked from awni/fast_conway_mlx.py
Conway's Game of Life Accelerated with Custom Kernels in MLX
import av
import numpy as np
import mlx.core as mx
def conway(a: mx.array):
source = """
uint i = thread_position_in_grid.x;
uint j = thread_position_in_grid.y;
uint n = threads_per_grid.x;