question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Apple Silicon M1 Cannot convert MPS Tensor to float64

See original GitHub issue

how could i convert to float32? on pure torch was simple, just converting tensor to dtype=torch.float32

full error

TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
araffincommented, Aug 18, 2022

Duplicate of https://github.com/DLR-RM/stable-baselines3/issues/914 and also related more to PyTorch than SB3…

0reactions
traderpedrosocommented, Aug 19, 2022

could you confirm that using a wrapper that cast observations to float32 (also for obs space) solve this issue ?

Yes, I did it! found out float64 won work with metal API as I said here #914, and thank you for your warning I want to use it only for portfolio manager calculate position size base volatility

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apple M1 silicon: TypeError: Cannot convert a MPS Tensor to ...
I attempt to train SegFormer model which I followed the Roboflow tutorial on my local machine M1 pro: How To Train SegFormer on...
Read more >
Apple MPS error in unet_2d_condition.py #358 - GitHub
When you use an LMSDiscreteScheduler on an Apple Silicon machine, you'll get the following error: Cannot convert a MPS Tensor to float64 ......
Read more >
How to convert float64 to make it work in apple silicon?
My dumb workaround will be to load it into CPU, make it float32, and then load to mps device. But not sure how...
Read more >
Utilize Apple M1 chip causes error (kernel death) #13
On an M1 (not M1 Max) I get TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support...
Read more >
StableDiffusion RUNS on M1 chips. - Reddit
TypeError : Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found