Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error on mac gpu with ot.gromov.fgw_barycenters #570

Answered by rflamary
youssef62 asked this question in Q&A
Discussion options

Hello,
Is it really necessary to have .double in this line ?
(backend.py line 1944)

 def norm(self, a, axis=None, keepdims=False):
 return torch.linalg.norm(a.double(), dim=axis, keepdims=keepdims)

It has the effect of coverting to float64 which is not supported by mps (gpu for mac silicon) , which raises this error
TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

Is this conversion to float64 intended ?

You must be logged in to vote

We rmoved this conversion in this PR that is now merged.
#572

Replies: 1 comment 2 replies

Comment options

I donnt think it is necessary and i don't remember why we have this. This is a recent change

@kachayev you did this change in the backend, do you knwo why? We should try to keep the precision and not change it there.

You must be logged in to vote
2 replies
Comment options

We rmoved this conversion in this PR that is now merged.
#572

Answer selected by youssef62
Comment options

Thank you for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /