-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow birefringence reconstruction for z-stacks #102
Comments
Thanks for writing this up @edyoshikun. I agree that we should expect ~linear reconstruction times with increasing FOV size since this is a voxel-by-voxel reconstruction. We'll need to do some debugging to figure out if this bottleneck is caused by:
A "trivial" (but more work intensive) temporary workaround might be to split the large stacks into pieces across CPUs/jobs. |
Ok, so thanks to @ziw-liu suggestion to run the individual z-planes separately. I used the multiprocess library to allocate 61 processes and got them down from 547s to 22s processing time. This is a short-term fix. I used the cProfiler and snakeviz visualizer and this points out to
|
Thanks for logging this @edyoshikun. For deeper debugging and proper fix, you can profile both |
Hi @edyoshikun , @talonchandler All the operations we apply to compute birefringence are straightforward with linear complexity (inverse instrument matrix, background correction, square roots). My observations/ questions:
|
|
@edyoshikun you can try out |
The time to reconstruct z-stacks is not linear and quickly becomes an issue reconstructing >50 slice z-stacks. These stacks have shapes (5,61,2048,2048) for 5-state polarization, Z,Y, X.
The issue arises mainly in the
reconstruct_qlipp_stokes()
function where we get:1 slice
Stokes Elapsed Time: 1.6s
Birefringence Elapsed Time: 0.4
5 slice
Stokes Elapsed Time: 10.2s
Birefringence Elapsed Time: 2s
10 slice
Stokes Elapsed Time: 24.6s
Birefringence Elapsed Time: 4.6s
61 slice
Stokes Elapsed Time: 210s
Birefringence Elapsed Time: 327s
I am documenting as an issue for further deep debugging. Thank you @talonchandler for testing and confirming similar results.
The text was updated successfully, but these errors were encountered: