MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / LogDet

Function LogDet

tensorflow/compiler/xla/client/lib/logdet.cc:38–43  ·  view source on GitHub ↗

let G = root(A) be the Cholesky root of the matrix A log(det(A)) = 2*sum(log(vecdiag(G)))

Source from the content-addressed store, hash-verified

36// let G = root(A) be the Cholesky root of the matrix A
37// log(det(A)) = 2*sum(log(vecdiag(G)))
38XlaOp LogDet(XlaOp a) {
39 XlaOp cholesky = Cholesky(a, /*bool lower=*/true);
40
41 return ScalarLike(a, 2) *
42 Einsum(Log(cholesky), "...aa->...", xla::PrecisionConfig::HIGHEST);
43}
44
45} // namespace xla

Callers 1

XLA_TEST_FFunction · 0.85

Calls 4

ScalarLikeFunction · 0.85
EinsumFunction · 0.70
CholeskyFunction · 0.50
LogFunction · 0.50

Tested by 1

XLA_TEST_FFunction · 0.68