pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Use contraction path to optimize `pt.nlinalg.matrix_dot`

Open jessegrabowski opened this issue 6 months ago • 0 comments

Description

Right now we have a function pt.nlinalg.matrix_dot that is just a helper for doing repeated dot products. This is similar to but worse than np.linalg.multi_dot, because multi_dot also computes an optimal contraction path, and does the dot products in a smart order.

#722 added optimized contraction path logic, so we could include this into our matrix_dot function. While we're at it, we should rename the function to multi_dot to match the numpy API.

jessegrabowski avatar Aug 05 '24 05:08 jessegrabowski