wesselb / lab

A generic interface for linear algebra backends
MIT License
70 stars 5 forks source link

Adds support for torch MPS backend #11

Closed magnusross closed 1 year ago

magnusross commented 1 year ago

I think the only required change is to how the random states/generators are dealt with.

I have done a bit of a hacky initial implementation, there is probably a cleaner way to do it. I didn't yet workout how to write some tests for it, but can have a go at that if needed.

Cheers!

magnusross commented 1 year ago

Hey Wessel, thanks for looking at this, I've fixed the suggestions, but I haven't yet done any tests, I couldn't immediately see how to do it, and am a bit busy with some other stuff right now. Happy to have a go at it later in the week!

wesselb commented 1 year ago

@magnusross absolutely not a problem! Happy to implement a simple test myself. I think your implementation is basically ready to go, so I'm merging this right away :)

Thanks again for the contribution!!