-
Notifications
You must be signed in to change notification settings - Fork 75
CUDA problem #17
Description
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.