Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ran into issue with running the demo due to unsupported autocast device_type 'cuda:0' ! Can you tell me how to resolve this ? #56

Closed
PHOENIXFURY007 opened this issue Jul 4, 2024 · 2 comments · Fixed by #57

Comments

@PHOENIXFURY007
Copy link

Hello,
Congrats on this work !
I am new to this field and ran into this error.
Can you tell me how to resolve this issue ?

(roma) [s20225561@pleiades3 demo]$ python demo_fundamental.py xFormers not available xFormers not available /home2/s20225561/.conda/envs/roma/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. warnings.warn( /home2/s20225561/.conda/envs/roma/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or Nonefor 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passingweights=None. warnings.warn(msg) Using coarse resolution (560, 560), and upsample res (864, 864) Traceback (most recent call last): File "/home4/playground/SiggraphAsia/RoMa/demo/demo_fundamental.py", line 27, in <module> warp, certainty = roma_model.match(im1_path, im2_path, device=device) File "/home2/s20225561/.conda/envs/roma/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/home4/playground/SiggraphAsia/RoMa/romatch/models/matcher.py", line 655, in match corresps = self.forward_symmetric(batch) File "/home4/playground/SiggraphAsia/RoMa/romatch/models/matcher.py", line 516, in forward_symmetric feature_pyramid = self.extract_backbone_features(batch, batched = batched, upsample = upsample) File "/home4/playground/SiggraphAsia/RoMa/romatch/models/matcher.py", line 462, in extract_backbone_features feature_pyramid = self.encoder(X, upsample = upsample) File "/home2/s20225561/.conda/envs/roma/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home2/s20225561/.conda/envs/roma/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "/home4/playground/SiggraphAsia/RoMa/romatch/models/encoders.py", line 112, in forward feature_pyramid = self.cnn(x) File "/home2/s20225561/.conda/envs/roma/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home2/s20225561/.conda/envs/roma/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "/home4/playground/SiggraphAsia/RoMa/romatch/models/encoders.py", line 70, in forward with torch.autocast(device_type=autocast_device, enabled=autocast_enabled, dtype = autocast_dtype): File "/home2/s20225561/.conda/envs/roma/lib/python3.10/site-packages/torch/amp/autocast_mode.py", line 241, in __init__ raise RuntimeError( RuntimeError: User specified an unsupported autocast device_type 'cuda:0'

This is my GPU setting -
`(roma) [s20225561@pleiades3 demo]$ nvidia-smi
Thu Jul 4 22:30:45 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06 Driver Version: 545.29.06 CUDA Version: 12.3 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 3090 Off | 00000000:01:00.0 Off | N/A |
| 30% 49C P0 114W / 350W | 2MiB / 24576MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+`

@PHOENIXFURY007 PHOENIXFURY007 changed the title Ran into issue with running the demo due to autocast issue ! Can you tell me how to resolve this ? Ran into issue with running the demo due to unsupported autocast device_type 'cuda:0' ! Can you tell me how to resolve this ? Jul 4, 2024
@Parskatt
Copy link
Owner

Parskatt commented Jul 4, 2024

Hi,

We recently had an pr for autocast, perhaps it introduced something. I'll have a look.

@Parskatt
Copy link
Owner

Parskatt commented Jul 4, 2024

@PHOENIXFURY007 Should now be fixed. Could you try pulling latest changes and rerunning?

@Parskatt Parskatt closed this as completed Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants