JuliaSmoothOptimizers / KrylovPreconditioners.jl

The ultimate collection of preconditioners
Other
7 stars 1 forks source link

Extensions for GPUs #21

Closed michel2323 closed 8 months ago

michel2323 commented 8 months ago

Moves all the GPU specific code to extensions, but introduces KernelAbstractions as a backend abstraction (including CPU).

amontoison commented 8 months ago

@michel2323 The error in CI builds is because we add directly CUDA.jl / AMDGPU.jl in the Project.toml of KrylovPreconditioners.jl. Can you update the file .buildkite.yml? https://github.com/JuliaSmoothOptimizers/KrylovPreconditioners.jl/blob/main/.buildkite/pipeline.yml#L12-L15

michel2323 commented 8 months ago

@amontoison I hope this helps. CUDA and AMDGPU need to be installed in the global environment.

michel2323 commented 8 months ago

@amontoison Last fix and tested on Frontier. It passes with AMDGPU#master on commit https://github.com/JuliaGPU/AMDGPU.jl/commit/8ac70bd9de5591bfc164d52a6e6b20c85f8ab6e1 .

amontoison commented 8 months ago

@michel2323 Do you think that we should rename the function BlockJacobiPreconditioner into kp_blockjacobi?

michel2323 commented 8 months ago

@michel2323 Do you think that we should rename the function BlockJacobiPreconditioner into kp_blockjacobi?

@amontoison I stick to the JuMP guideline which is also followed somehow by SciML, where structs are and constructors are camel case. But since this is near the low level routines... maybe KPBlockJacobi ? And change that for ILU and IC too? As you wish.

amontoison commented 8 months ago

I like the idea of KPBlockJacobi, I propose to rename these routines for the next release. I will release the current version KrylovPreconditioners.jl for now such that we can use it in Argos.jl.