Hello. When I try to run following code snippet:
self.metric3d = torch.hub.load('yvanyin/metric3d', 'metric3d_vit_small', pretrain=True).to(self.device)
pred_depth, confidence, output_dict = self.metric3d.inference({'input': rgb})
I get following error:
raise RuntimeError('Current CUDA Device does not support bfloat16. Please switch dtype to float16.')
RuntimeError: Current CUDA Device does not support bfloat16. Please switch dtype to float16.
RGB image dtype is torch.float32. Is this error related to dtype of image, or that simply my graphics card does not support type bfloat16?
Please switch dtype to float16 => does this mean to switch dtype or RGB to torch.float16 in my code or it refers to code of your project?
If I cast my RGB to torch.float16 then error is:
RuntimeError: Input type (c10::Half) and bias type (float) should be the same
My graphics card is: GeForce RTX 2080 SUPER
So I would like to know how to solve issue and whether this issue is related to the:
- pytorch and specific version
- cuda and specific version
- gpu device itself (i.e. that gpu device simply does not support this type)
- something else