-
Notifications
You must be signed in to change notification settings - Fork 11
Aug. 18 Friday 2023
GourlieK edited this page Aug 24, 2023
·
4 revisions
These plots includes the three types of computing Ncal
Ncal = np.matmul(G.T,np.matmul(psr.N,G)) #N_TOA-N_par x N_TOA-N_par
NcalInv = np.linalg.inv(Ncal) #N_TOA-N_par x N_TOA-N_par
Ncal = jnp.matmul(G.T,np.matmul(psr.N,G)) #N_TOA-N_par x N_TOA-N_par
NcalInv = jnp.linalg.inv(Ncal) #N_TOA-N_par x N_TOA-N_par
L = jsc.linalg.cholesky(psr.N)
A = jnp.matmul(L,G)
del L
Ncal = jnp.matmul(A.T,A)
del A
NcalInv = jnp.linalg.inv(Ncal)
Here is a text file containing information on memory usage per line of code when computing Ncal
:
NcalInv_mem.txt
Black is the original matrix multiplication,red is original matrix multiplication with Jax, and blue is Cholesky Decomposition with Jax