cvpy.utils.CASThreadTuner.CASThreadTuner.tune_thread_count¶
- static CASThreadTuner.tune_thread_count(action_function: Callable[[CAS, ndarray, ndarray], float], setup_function: Callable[[], CAS], teardown_function: Callable[[CAS], None], iterations: int = 5, controller_thread_range: range = range(4, 65, 4), worker_thread_range: range = range(4, 65, 4), objective_measure: Statistic = Statistic.MEAN) CASThreadTunerResults ¶
Compute the optimal thread count for a given image action.
- Parameters:
- action_function:class:’function’
Specifies a user-defined function that calls an image action.
- setup_function:class:’function’
Specifies a user defined function to set up CAS environment
- teardown_function:class:’function’
Specifies a user defined function to terminate the CAS session.
- iterations:class:’int’
Specifies the number of iterations to call action_function for each combination of threads.
- controller_thread_range:class:’range’
Specifies the range of threads on controller node.
- worker_thread_range:class:’range’
Specifies the range of threads on each worker node.
- objective_measure:class:’enum.EnumMeta’
Specifies the objective measure for performance over the given iterations - mean, median, minimum, maximum, stdev.
- Returns:
- class:
‘__main__.CASThreadTunerResults’ ..