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

CUDA problem #17

Open
321LFG opened this issue Jul 20, 2024 · 1 comment
Open

CUDA problem #17

321LFG opened this issue Jul 20, 2024 · 1 comment

Comments

@321LFG
Copy link

321LFG commented Jul 20, 2024

When running basicsr/test.py for EvTexture on a macOS system without GPU support, the script fails due to CUDA-related operations despite setting use_gpu: False.

Error Message:

AssertionError: Torch not compiled with CUDA enabled

Details:

  • The script is trying to execute CUDA functions (torch.zeros in dist_validation method).
  • The model and dataset are set up correctly.
  • The test process fails when calling dist_validation.

Steps to Reproduce:

Configure basicsr/test.py to use CPU (use_gpu: False).
Execute the script on macOS.

Expected Behavior: The script should run without attempting to initialize CUDA.

Actual Behavior: The script fails with a CUDA-related error.

Potential Solution: Modify the dist_validation method to ensure all operations are explicitly set to run on the CPU.

Code Snippet Causing Issue:

self.metric_results[folder] = torch.zeros(size, dtype=torch.float32, device=torch.device('cpu'))

Request for Assistance

Please provide guidance on ensuring the dist_validation method and related functions do not attempt to use CUDA when use_gpu: False.

@DachunKai
Copy link
Owner

@321LFG Sorry for the delayed reply. Our model currently requires CUDA for testing, and we haven't yet implemented support for CPU-only testing. However, we plan to work on adding no-CUDA testing capabilities soon. Thank you for your interest in our work!

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

No branches or pull requests

2 participants