Skip to content

Commit

Permalink
Fix non-AVX2 tuning without --benchmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-zurkowski committed Jun 8, 2021
1 parent 2d85ba6 commit 25b692f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions algo/gr/gr-4way.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ int scanhash_gr_4way(struct work *work, uint32_t max_nonce,
if (!opt_tuned && opt_tune) {
tune(pdata, thr_id);
opt_tuned = true; // Tuned.
opt_tune = false;
}

if (opt_benchmark) {
Expand Down
3 changes: 2 additions & 1 deletion algo/gr/gr.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ int gr_hash(void *output, const void *input0, const void *input1, int thrid) {
}

// Stop early.
if (work_restart[thrid].restart && !opt_benchmark) {
if (work_restart[thrid].restart && !(opt_benchmark || opt_tune)) {
if (opt_debug) {
applog(LOG_DEBUG, "Thread %d exit early", thrid);
}
Expand Down Expand Up @@ -249,6 +249,7 @@ int scanhash_gr(struct work *work, uint32_t max_nonce, uint64_t *hashes_done,
if (!opt_tuned && opt_tune) {
tune(pdata, thr_id);
opt_tuned = true; // Tuned.
opt_tune = false;
}

if (opt_benchmark) {
Expand Down

0 comments on commit 25b692f

Please sign in to comment.