exanauts / ExaPF.jl

A Power Flow Solver for GPUs in Julia
MIT License
58 stars 5 forks source link

fix tests if AMDGPU is not available #285

Closed frapac closed 7 months ago

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c0d69a6) 63.33% compared to head (3cbe3bf) 69.45%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #285 +/- ## ========================================== + Coverage 63.33% 69.45% +6.11% ========================================== Files 34 35 +1 Lines 4484 4488 +4 ========================================== + Hits 2840 3117 +277 + Misses 1644 1371 -273 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

michel2323 commented 7 months ago

The test failing with ERROR: LoadError: ArgumentError: Unknown component :hsa is an issue https://github.com/JuliaGPU/AMDGPU.jl/issues/564 with AMDGPU.jl. AMDGPU.jl should be loadable without an AMD GPU present, just like CUDA.jl. I'd prefer to have the tests being dependent on both packages. In particular, this does not resolve the issue if a user wants to use ExaPF and loads AMDGPU for some reason on a system without AMD GPUs.

michel2323 commented 7 months ago

AMDGPU.functional() works as expected. Using that now to guard has_rocm_gpu().

michel2323 commented 7 months ago

Ok to keep both AMDGPU and CUDA in the tests. But I feel somewhat uncomfortable with the current status: it looks to heavy in term of dependencies.

AMGPU and CUDA are not dependencies of ExaPF. I am not sure I understand.

michel2323 commented 7 months ago

@frapac So keeping CUDA.jl and AMDGPU.jl together in the tests and removing GPU packages from TestPolarForm.jl.