Skip to content

Stream safety of MAGMA functions #21821

@skrah

Description

@skrah

#21785 showed that at::svd() is not stream-safe. at::svd() uses magma_dgesdd().

According to http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=1080, the old way of making MAGMA functions stream-safe is:

lock()
magmablasSetKernelStream( s1 )
magma_dgemm( ... )
unlock() 

The new way is using a magma_queue_t, but not all functions have it. In particular magma_dgesdd() doesn't appear to have this parameter.

I'm not sure if either of these methods can be integrated into pytorch. Meanwhile, the functions should probably raise an error if a non-default stream is detected.

Metadata

Metadata

Assignees

Labels

high prioritymodule: internalsRelated to internal abstractions in c10 and ATentriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions