Skip to content

Commit

Permalink
Merge pull request #492 from JuliaHealth/koma-v0.9
Browse files Browse the repository at this point in the history
KomaMRI v0.9
  • Loading branch information
cncastillo authored Oct 1, 2024
2 parents 1708855 + 5b01fea commit ca742f6
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion KomaMRIBase/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "KomaMRIBase"
uuid = "d0bc0b20-b151-4d03-b2a4-6ca51751cb9c"
authors = ["Carlos Castillo Passi <[email protected]>"]
version = "0.9.0-DEV"
version = "0.9.0"

[deps]
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Expand Down
2 changes: 1 addition & 1 deletion KomaMRICore/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "KomaMRICore"
uuid = "4baa4f4d-2ae9-40db-8331-a7d1080e3f4e"
authors = ["Carlos Castillo Passi <[email protected]>"]
version = "0.9.0-DEV"
version = "0.9.0"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
2 changes: 1 addition & 1 deletion KomaMRIFiles/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "KomaMRIFiles"
uuid = "fcf631a6-1c7e-4e88-9e64-b8888386d9dc"
authors = ["Carlos Castillo Passi <[email protected]>"]
version = "0.9.0-DEV"
version = "0.9.0"

[deps]
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Expand Down
2 changes: 1 addition & 1 deletion KomaMRIPlots/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "KomaMRIPlots"
uuid = "76db0263-63f3-4d26-bb9a-5dba378db904"
authors = ["Carlos Castillo Passi <[email protected]>"]
version = "0.9.0-DEV"
version = "0.9.0"

[deps]
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "KomaMRI"
uuid = "6a340f8b-2cdf-4c04-99be-4953d9b66d0a"
authors = ["Carlos Castillo Passi <[email protected]>"]
version = "0.9.0-DEV"
version = "0.9.0"

[deps]
AssetRegistry = "bf4720bc-e11a-5d0c-854e-bdca1663c893"
Expand Down
6 changes: 3 additions & 3 deletions examples/3.tutorials/lit-06-DiffusionMotion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using PlotlyJS # hide
using Random # hide

# The purpose of this tutorial is to showcase the simulation of diffusion-related effects.
# For this, we are going to define a `Path <: Motion` to simulate the Brownian motion of spins.
# For this, we are going to define a [`Path`](@ref) motion to simulate the Brownian motion of spins.
# This is not the most efficient way of simulating diffusion, but it is a good way to understand the phenomenon.
# In particular, we will going to simulate isotropic diffusion, characterized by the Apparent Diffusion Coefficient (ADC).

Expand Down Expand Up @@ -34,7 +34,7 @@ D = 2e-9 # Diffusion Coefficient of water in m^2/s
T = 100e-3 # Duration of the motion
Nt = 100 # Number of time steps
Δt = T / (Nt - 1) # Time sep
Δr = sqrt(2 * D * Δt) # √ Mean square displacement
Δr = sqrt(2 * D * Δt) # √ Mean square displacement

# Random walk is defined as the cumulative sum of random displacements:
rng = MersenneTwister(1234) # Setting up the random seed
Expand Down Expand Up @@ -117,7 +117,7 @@ function bvalue(seq)
block, axis = 2, 1 # Gx from second block
G = seq.GR[axis, block].A
δ = seq.GR[axis, block].T
Δ = dur(seq[1:2]) # Because there is no space in between
Δ = dur(seq[2:3]) # Because there are no gaps
b = (2π * γ * G * δ)^2 *- δ/3)
return b * 1e-6
end
Expand Down

11 comments on commit ca742f6

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KomaMRI Benchmarks

Benchmark suite Current: ca742f6 Previous: 48a5bbe Ratio
MRI Lab/Bloch/CPU/2 thread(s) 223115374 ns 230260983 ns 0.97
MRI Lab/Bloch/CPU/4 thread(s) 132097936.5 ns 130246287 ns 1.01
MRI Lab/Bloch/CPU/8 thread(s) 146470163 ns 141633208 ns 1.03
MRI Lab/Bloch/CPU/1 thread(s) 370624128 ns 400677945.5 ns 0.92
MRI Lab/Bloch/GPU/CUDA 55534616 ns 55535980 ns 1.00
MRI Lab/Bloch/GPU/oneAPI 498364290 ns 495029548 ns 1.01
MRI Lab/Bloch/GPU/Metal 547774125 ns 541225208 ns 1.01
MRI Lab/Bloch/GPU/AMDGPU 34679784 ns 34691883.5 ns 1.00
Slice Selection 3D/Bloch/CPU/2 thread(s) 1155465921 ns 1153307006.5 ns 1.00
Slice Selection 3D/Bloch/CPU/4 thread(s) 615942454.5 ns 605676119.5 ns 1.02
Slice Selection 3D/Bloch/CPU/8 thread(s) 418827220 ns 387857453 ns 1.08
Slice Selection 3D/Bloch/CPU/1 thread(s) 2098515633.5 ns 2232808553 ns 0.94
Slice Selection 3D/Bloch/GPU/CUDA 101206570.5 ns 101291917 ns 1.00
Slice Selection 3D/Bloch/GPU/oneAPI 637714919 ns 632996422 ns 1.01
Slice Selection 3D/Bloch/GPU/Metal 553824458 ns 552117729 ns 1.00
Slice Selection 3D/Bloch/GPU/AMDGPU 59199152.5 ns 59154320.5 ns 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@cncastillo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=KomaMRIBase

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/116402

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a KomaMRIBase-v0.9.0 -m "<description of version>" ca742f69d7e60c1515396ceae739ad8cabd25891
git push origin KomaMRIBase-v0.9.0

@cncastillo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=KomaMRICore

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/116406

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a KomaMRICore-v0.9.0 -m "<description of version>" ca742f69d7e60c1515396ceae739ad8cabd25891
git push origin KomaMRICore-v0.9.0

@cncastillo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=KomaMRIFiles

@cncastillo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register subdir=KomaMRIPlots

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/116408

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a KomaMRIFiles-v0.9.0 -m "<description of version>" ca742f69d7e60c1515396ceae739ad8cabd25891
git push origin KomaMRIFiles-v0.9.0

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/116409

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a KomaMRIPlots-v0.9.0 -m "<description of version>" ca742f69d7e60c1515396ceae739ad8cabd25891
git push origin KomaMRIPlots-v0.9.0

@cncastillo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

This new breaking release of Koma v0.9 has multiple new features. Thanks to @rkierulf, our GSoC student, for the GPU enhancements and @pvillacorta for the new motion definitions that enable flow and shareable phantoms.

(1) Device-agnostic kernel-based simulations (more info here)
We can now use various GPU backends with the help of KernelAbstractions.jl. This means that GPU-related packages like CUDA are not installed by default. Installation and loading of the desired GPU package is needed (for example ] add CUDA, using CUDA).

(2) New simulation method, faster and better
Now Bloch has specialized implementations for CPU and GPU and the previous implementation is in BlochSimple. This new simulation method is 4-5 times faster and uses around 80 times less memory. We have seen a 100-200x improvement in some sequences, especially if they have a lot of soft RF pulses.

(3) Distributed simulations (more info here)
We also tested distributed simulations with multiple GPUs and nodes :)

(4) GPU benchmarks (here)
We have a fancy new benchmarking page to ensure that there are no performance regressions.

(5)Phantom's including flexible motions and flow (more experimental)
You can now plot phantoms with motion and define them using mix-and-match motion definitions! More complex phantoms are possible including simple motions or arbitrary motions. Many more examples of using them are coming soon! 😄 including a realistic CFD-simulated aorta! All of this is done using our new reproducible phantom definition (HDF5-based), which enables the sharing of these phantoms with complex motion.

Hope these changes make your simulations faster! 😄 As always, if you have any problems, feel free to talk to me (@cncastillo ) in Slack or post an issue or discussion on GitHub.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/116415

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.0 -m "<description of version>" ca742f69d7e60c1515396ceae739ad8cabd25891
git push origin v0.9.0

Please sign in to comment.