Closed uellue closed 3 years ago
Is this parallelization used for steps before and after the UDF?
Is this parallelization used for steps before and after the UDF?
The idea is that we can, in addition to the more coarse-grained data-parallelism, also support fine-grained parallelism inside of the UDF. For example, one could allow two threads per process, and possibly gain something from hyperthreading, or more than two threads if it matches the CPU/NUMA topology better.
In the extreme case, one would allow to use nthreads=ncores
inside the UDF and use a single process - we (ab)use this for our live processing prototype, where the multi-process version is not done yet.
The commit history now contains a version that uses multithreading on transposed data. Wall clock wise it is 40 % slower, but CPU time wise it is 2x as fast as the current state. Is this useful for anything?
Rerunning CI, should work now with current LiberTEM release 0.7
Merging #35 (a517b1e) into master (f64e89a) will decrease coverage by
2.81%
. The diff coverage is55.88%
.
@@ Coverage Diff @@
## master #35 +/- ##
==========================================
- Coverage 66.90% 64.08% -2.82%
==========================================
Files 8 8
Lines 278 323 +45
Branches 29 38 +9
==========================================
+ Hits 186 207 +21
- Misses 81 104 +23
- Partials 11 12 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/ptychography40/reconstruction/ssb/udf.py | 63.20% <50.81%> (-10.61%) |
:arrow_down: |
src/ptychography40/reconstruction/ssb/__init__.py | 100.00% <100.00%> (ø) |
|
src/ptychography40/reconstruction/ssb/trotters.py | 65.88% <100.00%> (+1.68%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f64e89a...a517b1e. Read the comment docs.
Tests passed, merging! Other open issues before the release can be addressed in separate PRs.
With this change, using the CPU is faster than the GPU.
This can be merged and released after LiberTEM is released with the new threading feature.
Contributor Checklist: