Skip to content

CUDA problem #17

Description

@321LFG

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions