Optimal depth of the computational pipeline for a given amount of input data
A computational pipeline is considered, the stages of which can have different logic delays, and the overhead clock of the channels is the same. Given the probability that the data element calls a restart, an analytical model is constructed to calculate the most probable and expected times for processing input data elements for a given amount of input data. Based on this model, it is shown that for a given number of stages and total logical delay, the pipeline has maximum performance if and only if the delays of the stages are equal to each other. For the pipeline with the same delays of stages, a correction is made for the well-known Duby-Flynn formula for the optimum depth of the computational pipeline with a given probability of restart, taking into account the number of elements being processed. The criterion of optimality can be the minimum most probable data processing time or the minimum value of the mathematical expectation the data processing time. An example is given showing that this correction can be significant. It is shown that for given restart probability, total logical delay, channel exchange time and data volume, this formula gives the optimum depth on the set of all pipelines, including pipelines with different stage delays.