Metal shaders with PyTorch from end to end
medium.com
1 thread
Learn how to speed up PyTorch code with custom Metal shaders to take advantage of MPS support on Apple silicon. We will write from scratch a Python library that compiles a Metal shader using C++/Objective-C and lets you call the method from Python using pybind11.