+ All Categories
Home > Documents > Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is...

Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is...

Date post: 07-Aug-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
7
Locks in FFTW is limiting CPU efficiency when multi-threading 11/21/19 Haiwang Yu 1 Noise filtering with sticky code mitigation (SCM) https://github.com/WireCell/wire-cell-toolkit/pull/8 NF SP http://www.fftw.org/fftw3_doc/Thread-safety.html Protodune::StickyCodeMitig::apply() FFT in SCM
Transcript
Page 1: Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is limiting CPU efficiency when multi-threading 11/21/19 Haiwang Yu 1 ... A lot of creating

Locks in FFTW is limiting CPU efficiency when multi-threading

11/21/19 Haiwang Yu 1

Noise filtering with sticky code mitigation (SCM)https://github.com/WireCell/wire-cell-toolkit/pull/8

NF SP

http://www.fftw.org/fftw3_doc/Thread-safety.html

Protodune::StickyCodeMitig::apply()

FFT in SCM

Page 2: Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is limiting CPU efficiency when multi-threading 11/21/19 Haiwang Yu 1 ... A lot of creating

Reading Eigen FFT code

11/21/19 Haiwang Yu 2

https://eigen.tuxfamily.org/dox/unsupported/ei__fftw__impl_8h_source.html

Plan caching

Thread unsafe

Eigen FFTW implementation has this plan caching feature!

Page 3: Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is limiting CPU efficiency when multi-threading 11/21/19 Haiwang Yu 1 ... A lot of creating

Waveform::dft ⟹ Waveform::FFT::dft

11/21/19 Haiwang Yu 3

Plan cache destroyed in ‘Eigen::FFT’ dtor

Could create an ‘FFT’ instance for each INode using FFT. Then Plan cache could live the whole running period.Not many chances to hit the planner call locks

In the SCM code, FFT was performed 4 times per channel!A lot of creating new plans.

Page 4: Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is limiting CPU efficiency when multi-threading 11/21/19 Haiwang Yu 1 ... A lot of creating

Plan caching FFT in MT mode

11/21/19 Haiwang Yu 4

Page 5: Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is limiting CPU efficiency when multi-threading 11/21/19 Haiwang Yu 1 ... A lot of creating

SCM with Pgrapher - ST

11/21/19 Haiwang Yu 5

Page 6: Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is limiting CPU efficiency when multi-threading 11/21/19 Haiwang Yu 1 ... A lot of creating

Next: mbCoherentNoiseSub

11/21/19 Haiwang Yu 6

updated with plan caching FFT:pdStickyCodeMitigpdOneChannelNoisepdRelGainCalib – no fft used

next:mbCoherentNoiseSub

Page 7: Locks in FFTW is limiting CPU efficiency when multi-threading · 21/11/2019  · Locks in FFTW is limiting CPU efficiency when multi-threading 11/21/19 Haiwang Yu 1 ... A lot of creating

SCM with Pgrapher - ST

11/21/19 Haiwang Yu 7

no fft

w/ fft no plan caching

w/ fft plan caching


Recommended