ulysseB / telamon

A framework to find good combinations of optimizations for computational kernels on GPUs.
https://ulysseb.github.io/telamon/telamon
Apache License 2.0
23 stars 6 forks source link

Don't update the cut if it is worse than before #272

Closed Elarnon closed 5 years ago

Elarnon commented 5 years ago

When using the initial_cut parameter (eg when reusing a cut found from a previous search), we were updating the cut after a first valid implementation is found. Such an implementation would have a bound that is less than the initial cut, but not necessarily (in fact, almost never) an execution time lower than the initial cut -- thus we would in fact make the cut worse by performing this update.

This patch instead changes it so that we only update the cut if it improves it.

NB: An alternative fix for this issue would be to take the initial cut into account in the monitor, but this means we would ignore implementations that are not faster than the initial cut. This would limit the usefulness of the initial_cut parameter -- in particular, it wouldn't be possible to use it to optimisticaly cut branches with an aggressive cut for which we don't have an implementation.

Elarnon commented 5 years ago

bors r=andidr

bors[bot] commented 5 years ago

Build failed (retrying...)

bors[bot] commented 5 years ago

Build failed

Elarnon commented 5 years ago

bors retry

Elarnon commented 5 years ago

bors retry

bors[bot] commented 5 years ago

Timed out