Gaussian elimination in TVM

Hello everyone,

I was wondering if the Gaussian elimination algorithm (probably without pivoting) is implementable in the standard Relay->Compute->Schedule process described for NN operators.

//Gaussian elimination without pivoting
  for (int i = 0; i < N-1; i++) {
       for (int j = i; j < N; j++) { //non static bounded loop
           double ratio = A[j][i]/A[i][i];
           for (int k = i; k < N; k++) { //non static bounded loop
                A[j][k] -= (ratio*A[i][k]);
                b[j] -= (ratio*b[i]);
           }
       }
  }

I am inclined to say that using the standard TE->TIR step this is not possible. But the code above I am almost certain can be written in TIR directly.

Thoughts?

Hmm, wondering if can be done in pure python only with lambdas ? If yes, then tvm too.

Mind expanding on that? I know what lambda functions are in Python but I am not fully aware of huge limitations.