What's the reasoning behind implementation-defined function behaviour?

29 views
Skip to first unread message

Joel

unread,
Apr 7, 2022, 1:08:15 PM4/7/22
to XLA development
Hi,

I'm working out how to integrate with the Cholesky API, and notice its behaviour is implementation defined on a couple of points:

"""

Input data is read only from the lower/upper triangle of a, depending on the value of lower. Values from the other triangle are ignored. Output data is returned in the same triangle; the values in the other triangle are implementation-defined and may be anything.

...

If a is not symmetric (Hermitian) positive definite, the result is implementation-defined.

"""

It might help me understand how to integrate with this if I had a better understanding of why different implementations have different behaviours.

Regards,

Joel

Peter Hawkins

unread,
Apr 7, 2022, 1:41:58 PM4/7/22
to Joel, XLA development
It's just saying that we don't promise anything about the values in the "other" triangle of a symmetric matrix. Some valid behaviors include:
* zeros
* whatever was in the input data for that triangle (e.g., a LAPACK-based implementation might do this).

Most likely what you want to do is mask out the unused triangle and replace it with zeros, which you can easily do on the output of Cholesky if needed.

Peter 

--
You received this message because you are subscribed to the Google Groups "XLA development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xla-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xla-dev/931dab15-6bd5-4134-a903-95e42fc0ae90n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages