Skip to content

Commit

Permalink
examples: fix conversion warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraujom authored and vpirogov committed Oct 14, 2022
1 parent 4c9d46a commit b5faa77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/matmul_perf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void fill_random(std::vector<float> &out, bool is_integer) {

random_data_i.resize(nrand);
for (auto &d : random_data_i)
d = dist_i(generator);
d = static_cast<float>(dist_i(generator));

random_data_f.resize(nrand);
for (auto &d : random_data_f)
Expand Down Expand Up @@ -218,7 +218,8 @@ void run(engine::kind engine_kind, dt type, gemm_dims_t dims,
double mnk_expand = std::exp2(
std::round(std::log2(nruns_est / min_runs) / 3.));
if (mnk_expand <= 1) break;
mnk = std::min<double>(max_mnk, mnk * mnk_expand);
mnk = static_cast<int>(
std::min<double>(max_mnk, mnk * mnk_expand));
}

dims.m = dims.n = dims.k = mnk;
Expand Down

0 comments on commit b5faa77

Please sign in to comment.