  toggle dark mode toggle dark mode

Tag: C++

Creating a Pytorch solver for sparse linear systems

posted on 2020-10-17T11:04:18Z
tags: ml (7)machine learning python (6) c++ (1)

Not so long ago, I implemented a wrapper library in PyTorch to solve sparse linear systems on the CPU using the SuiteSparse routines under the hood. My goal is to eventually integrate this sparse solver into my photonic circuit simulator, Photontorch. However, for now, I thought it would be instructive to go over the steps I took to implement both the forward pass and the backward pass of such a custom PyTorch function.