Skip to content

RFC: Seeking feedback on adding new special functions from SciPy #8303

Description

@steppi

Hi CuPy devs!

You may have seen that in scipy.special we're working on translating the scalar kernels for special functions into C++ which can run on both CPU and on GPUs with CUDA. The hope is that this could be a common code base for SciPy and CuPy allowing us to add functions from SciPy which are currently missing in CuPy, and have a common place to make bug fixes and improvements. So far #8140, and #8163 have landed in CuPy for Lambert's W function, and Digamma of a complex argument respectively.

There's been a tremendous burst of activity in special lately, and within the next week we should have dozens of new functions ready to PR to CuPy. My questions are:

  1. Would you be happy to add any special function currently available in SciPy's public API, or would you prefer to select only from a subset of the more important ones?
  2. At what rate would you like to see new functions added? Would a single PR adding everything currently translated be OK, should we stick to one function per time, or something in-between like PRs for clusters of related functions?
  3. Do you have an approximate timeline for the 14.0 release date, so we can have a sense of the pace we should work at to get as many wanted things in as possible before then?
  4. Would you be supportive of replacing existing special function implementations from CuPy with the ones we are now writing for SciPy to make it easier to benefit from improvements and fixes made in SciPy?
  5. Do you have any thoughts on the idea of separating out the scalar kernels we are working on in SciPy into a separate library which is included as a submodule of both SciPy and CuPy? For the time-being we plan to carry on by just copying code from SciPy into CuPy, but we are hoping to make this a separate special functions library in the future.

Thank you. I look forward to hearing your thoughts.

cc @izaid @rgommers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions