Skip to content

Commit

Permalink
Merge pull request #40 from colleeneb/cuda_best_flops
Browse files Browse the repository at this point in the history
Modifications to avoid including "gflop/s" in the "best gflop/s" computation if the validation fails
  • Loading branch information
tom91136 authored Oct 15, 2024
2 parents 1c195f8 + a994986 commit 570f66c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#include <string>
#include <vector>

#include <algorithm>
#include <fstream>
#include <sstream>
#include <functional>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <unordered_map>

#include "bude.h"
Expand All @@ -27,8 +27,7 @@
#endif

#ifndef MINIBUDE_COMPILE_COMMANDS
#define MINIBUDE_COMPILE_COMMANDS \
{ MINIBUDE_WARN_NOT_CMAKE }
#define MINIBUDE_COMPILE_COMMANDS {MINIBUDE_WARN_NOT_CMAKE}
#endif

#ifdef USE_CPU_FEATURES
Expand Down Expand Up @@ -388,9 +387,12 @@ std::pair<double, std::vector<size_t>> validate(const Sample &sample, const Para
}
// flush at the end to make sure errors are clumped together
std::cerr << std::flush;
return {valid, maxDiffPct, s, SummaryStats<double>({std::numeric_limits<double>::max()}), 0, 0, 0};
} else if (!valid)
return {valid, maxDiffPct, s, SummaryStats<double>({std::numeric_limits<double>::max()}), 0, 0, 0};
else {
return {valid, maxDiffPct, s, SummaryStats<double>(msWithoutWarmup), gflops, gfinsts, interactions_per_sec};
}

return {valid, maxDiffPct, s, SummaryStats<double>(msWithoutWarmup), gflops, gfinsts, interactions_per_sec};
}

[[nodiscard]] std::pair<int, std::string> selectDevice(const std::string &needle,
Expand Down

0 comments on commit 570f66c

Please sign in to comment.