Skip to content

Commit ff1b199

Browse files
authored
DOC: Add benchmark page (#3312)
First pass, just translating what's in the OHBM abstract into RST. LMK if you have comments on the overall presentation style. Also fixes some warnings/errors during doc builds that weren't caught before release.
1 parent 4755254 commit ff1b199

File tree

6 files changed

+116
-14
lines changed

6 files changed

+116
-14
lines changed

docs/benchmarks.rst

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
.. include:: links.rst
2+
3+
----------------------
4+
Performance benchmarks
5+
----------------------
6+
7+
Datasets and commands
8+
---------------------
9+
10+
Datasets
11+
~~~~~~~~
12+
+------------+----------------------------------------------------------------------------------------+
13+
| Dataset | Description |
14+
+============+========================================================================================+
15+
| A | 6 T1w, 3 T2w, 2 PhaseDiff, 4 SE-BOLD (195 volumes / series; total 784), 4 sbref |
16+
+------------+----------------------------------------------------------------------------------------+
17+
| B | 2 T1w, 6 PEPolar fieldmaps, 8 SE-BOLD (4274 volumes total) |
18+
+------------+----------------------------------------------------------------------------------------+
19+
20+
fMRIPrep versions and modes
21+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
22+
23+
All commands took the form ``fmriprep sourcedata/raw . participant $OPTIONS``.
24+
The specific options for each version or mode are presented in the following table.
25+
26+
+------------+----------------------------------------------------------------------------------------+
27+
| Version / | Options |
28+
| Mode | |
29+
+============+========================================================================================+
30+
| 23.1.4 | ``--cifti-output --output-spaces MNI152NLin2009cAsym`` |
31+
+------------+----------------------------------------------------------------------------------------+
32+
| 23.2.0a2 / | ``--level minimal --cifti-output --output-spaces MNI152NLin2009cAsym`` |
33+
| fit | |
34+
+------------+----------------------------------------------------------------------------------------+
35+
| 23.2.0a2 / | ``--level full --cifti-output --output-spaces MNI152NLin2009cAsym`` |
36+
| fit + | |
37+
| transform | |
38+
+------------+----------------------------------------------------------------------------------------+
39+
40+
Machine details
41+
~~~~~~~~~~~~~~~
42+
43+
Tests were run on a desktop machine running no other significant tests.
44+
45+
* Processor: Intel i9-10900 CPU @ 2.80GHz, 20-core
46+
* Memory: 64GiB
47+
* Storage: PC801 NVMe SK hynix 2TB
48+
* OS: Ubuntu 22.04
49+
* Environment: Docker images published to https://hub.docker.com/r/nipreps/fmriprep/
50+
51+
Benchmarks
52+
----------
53+
54+
Dataset A
55+
~~~~~~~~~
56+
57+
+------------+---------+---------+---------+---------+---------+
58+
| Version / | Runtime | Scratch | Scratch | Output | Output |
59+
| Mode | | Size | Files | Size | files |
60+
+============+=========+=========+=========+=========+=========+
61+
| 23.1.4 | 2h24m | 54.8GB | 36.8K | 2.30GB | 176 |
62+
+------------+---------+---------+---------+---------+---------+
63+
| 23.2.0a2 | 1h35m | 2.91GB | 5.89K | 602MB | 128 |
64+
| / fit | | | | | |
65+
+------------+---------+---------+---------+---------+---------+
66+
| 23.2.0a2 | 1h47m | 19.8GB | 10.0K | 6.37GB | 206 |
67+
| / fit + | | | | | |
68+
| transform | | | | | |
69+
+------------+---------+---------+---------+---------+---------+
70+
71+
Dataset B
72+
~~~~~~~~~
73+
74+
+------------+---------+---------+---------+---------+---------+
75+
| Version / | Runtime | Scratch | Scratch | Output | Output |
76+
| Mode | | Size | Files | Size | files |
77+
+============+=========+=========+=========+=========+=========+
78+
| 23.1.4 | 4h25m | 121GB | 157K | 5.10GB | 286 |
79+
+------------+---------+---------+---------+---------+---------+
80+
| 23.2.0a2 | 1h29m | 1.88GB | 12.0K | 543MB | 206 |
81+
| / fit | | | | | |
82+
+------------+---------+---------+---------+---------+---------+
83+
| 23.2.0a2 | 2h7m | 56.5GB | 19.8K | 14.7GB | 348 |
84+
| / fit + | | | | | |
85+
| transform | | | | | |
86+
+------------+---------+---------+---------+---------+---------+

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Contents
1616
usage
1717
workflows
1818
outputs
19+
benchmarks
1920
spaces
2021
faq
2122
api

docs/workflows.rst

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ single reference template (see `Longitudinal processing`_).
6262

6363
from niworkflows.utils.spaces import Reference, SpatialReferences
6464
from smriprep.workflows.anatomical import init_anat_preproc_wf
65+
spaces=SpatialReferences([
66+
('MNI152Lin', {}),
67+
('fsaverage', {'density': '10k'}),
68+
('T1w', {}),
69+
('fsnative', {})
70+
])
71+
spaces.checkpoint()
6572
wf = init_anat_preproc_wf(
6673
bids_root='.',
6774
freesurfer=True,
@@ -71,12 +78,7 @@ single reference template (see `Longitudinal processing`_).
7178
output_dir='.',
7279
skull_strip_mode='force',
7380
skull_strip_template=Reference('MNI152NLin2009cAsym'),
74-
spaces=SpatialReferences([
75-
('MNI152Lin', {}),
76-
('fsaverage', {'density': '10k'}),
77-
('T1w', {}),
78-
('fsnative', {})
79-
]),
81+
spaces=spaces,
8082
skull_strip_fixed_seed=False,
8183
t1w=['sub-01/anat/sub-01_T1w.nii.gz'],
8284
t2w=[],
@@ -267,9 +269,9 @@ packages, including FreeSurfer and the `Connectome Workbench`_.
267269
:simple_form: yes
268270

269271
from smriprep.workflows.surfaces import init_surface_recon_wf
270-
wf = init_surface_recon_wf(omp_nthreads=1,
271-
hires=True,
272-
precomputed={})
272+
wf = init_surface_recon_wf(
273+
omp_nthreads=1, hires=True, precomputed={}, fs_no_resume=False,
274+
)
273275

274276
See also *sMRIPrep*'s
275277
:py:func:`~smriprep.workflows.surfaces.init_surface_recon_wf`
@@ -401,6 +403,7 @@ Slice time correction
401403

402404
from fmriprep.workflows.bold import init_bold_stc_wf
403405
wf = init_bold_stc_wf(
406+
mem_gb={'filesize': 1},
404407
metadata={'RepetitionTime': 2.0,
405408
'SliceTiming': [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]},
406409
)
@@ -479,8 +482,9 @@ EPI to T1w registration
479482
wf = init_bbreg_wf(
480483
omp_nthreads=1,
481484
use_bbr=True,
482-
bold2t1w_dof=9,
483-
bold2t1w_init='register')
485+
bold2anat_dof=9,
486+
bold2anat_init='t2w',
487+
)
484488

485489
The alignment between the reference :abbr:`EPI (echo-planar imaging)` image
486490
of each run and the reconstructed subject using the gray/white matter boundary
@@ -510,7 +514,16 @@ Resampling BOLD runs onto standard spaces
510514
:simple_form: yes
511515

512516
from fmriprep.workflows.bold.apply import init_bold_volumetric_resample_wf
513-
wf = init_bold_volumetric_resample_wf(metadata={}, fieldmap_id='fmap')
517+
wf = init_bold_volumetric_resample_wf(
518+
metadata={
519+
'RepetitionTime': 2.0,
520+
'PhaseEncodingDirection': 'j-',
521+
'TotalReadoutTime': 0.03
522+
},
523+
mem_gb={'resampled': 1},
524+
jacobian=True,
525+
fieldmap_id='fmap',
526+
)
514527

515528
This sub-workflow concatenates the transforms calculated upstream (see
516529
`Head-motion estimation`_, `Susceptibility Distortion Correction (SDC)`_ --if
@@ -564,7 +577,6 @@ HCP Grayordinates
564577

565578
from fmriprep.workflows.bold.resampling import init_bold_fsLR_resampling_wf
566579
wf = init_bold_fsLR_resampling_wf(
567-
estimate_goodvoxels=True,
568580
grayord_density='92k',
569581
omp_nthreads=1,
570582
mem_gb=1,

fmriprep/workflows/bold/apply.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def init_bold_volumetric_resample_wf(
3636
'PhaseEncodingDirection': 'j-',
3737
'TotalReadoutTime': 0.03
3838
},
39+
mem_gb={'resampled': 1},
40+
jacobian=True,
3941
fieldmap_id='my_fieldmap',
4042
)
4143

fmriprep/workflows/bold/registration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def init_bold_reg_wf(
8080
omp_nthreads=1,
8181
use_bbr=True,
8282
bold2anat_dof=9,
83-
bold2anat_init='auto')
83+
bold2anat_init='t2w')
8484
8585
Parameters
8686
----------

fmriprep/workflows/bold/stc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def init_bold_stc_wf(
7373
7474
from fmriprep.workflows.bold import init_bold_stc_wf
7575
wf = init_bold_stc_wf(
76+
mem_gb={'filesize': 1},
7677
metadata={"RepetitionTime": 2.0,
7778
"SliceTiming": [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]},
7879
)

0 commit comments

Comments
 (0)