Skip to content

Commit

Permalink
Use Adapt.jl for moving SF to GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
nHackel committed Jul 16, 2024
1 parent e964253 commit 5658207
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors = ["Tobias Knopp <[email protected]>"]
version = "0.6.0"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
DistributedArrays = "aaf54ef3-cdf8-58ed-94cc-d582ad619b94"
Expand All @@ -25,6 +26,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"

[compat]
AbstractImageReconstruction = "0.3"
Adapt = "3, 4"
DSP = "0.6, 0.7"
Distributed = "1"
DistributedArrays = "0.6"
Expand Down
1 change: 1 addition & 0 deletions src/MPIReco.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module MPIReco
@reexport using MPIFiles
const shape = MPIFiles.shape
using AbstractImageReconstruction
using Adapt
@reexport using DSP
using ProgressMeter
using Unitful
Expand Down
4 changes: 1 addition & 3 deletions src/SystemMatrix/SystemMatrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ end
function process(t::Type{<:AbstractMPIRecoAlgorithm}, params::DenseSystemMatixLoadingParameter, sf::MPIFile, frequencies::Vector{CartesianIndex{2}})
S, grid = getSF(sf, frequencies, nothing; toKwargs(params)...)
@info "Loading SM"
if !isa(S, params.arrayType)
S = params.arrayType(S)
end
S = adapt(params.arrayType, S)
return S, grid
end

Expand Down

0 comments on commit 5658207

Please sign in to comment.