Skip to content

Dot and blas slowed by negative strides #1388

Open
@TeemuSailynoja

Description

@TeemuSailynoja

Context for the issue:

Currently, cumulative sum is implemented as a wrapper for the corresponding Numpy function.
When testing with vectors, instead of using

pt.cumsum(x)

using

pt.dot(pt.tril(pt.ones((d,d))), x)

where d is the length of vector x, seems to lead to considerably faster sampling performance.

See this gist for a quick demo.

Proposal:

Keep the API un changed, but change the internals to compute the dot product with the lower diagonal matrix for the dimension specified in the axis argument of cumsum.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions