Opened 7 years ago

#1075 new enhancement

speed improvement for 2d fits

Reported by: pkienzle Owned by:
Priority: minor Milestone: SasView 4.3.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

The code for evaluating functions with dispersity on the parameter values has been set up so that it only schedules a portion of the iterations on each call, accumulating the result until all points in all dispersity distributions have been evaluated. This is required when using sasview on a desktop machine, which can crash if an application holds onto the GPU device too long.

When you have a fast graphics card not attached to a display device (e.g., a server dedicated to GPGPU computations) you do not need to do this, and it can be significantly faster to compute the entire distribution in one go. For example, a 2d cylinder with dispersity in length, radius, theta and phi takes 3.6 s per point when breaking the loop vs 2.5 s per point when computing in one set, or a 30% improvement.

The simple solution is to use an environment variable on those dedicated machines which tells the engine to skip the chunking.

Alternatively, dynamic chunking could be introduced, adjusting the chunk size based on how long each chunk is taking. Be warned, that when a probability cutoff is used, the first set of points within the distribution are going to have the lowest probability and are most likely to be cut, giving an extremely optimistic estimate of the kernel running time. Since the consequences of choosing too large a chunk size can be catastrophic on some machines, the simple solution is preferred.

Change History (0)

Note: See TracTickets for help on using tickets.