Skip to content

Commit

Permalink
Fix tuner buffer overflow with small nets.
Browse files Browse the repository at this point in the history
Fixes issue leela-zero#2347.

Pull request leela-zero#2360.
  • Loading branch information
ihavnoid authored and gcp committed Apr 29, 2019
1 parent e542dd0 commit bf17515
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Tuner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ template <typename net_t>
std::string Tuner<net_t>::tune_sgemm(const int m, const int n, const int k,
const int batch_size, const int runs) {
// This needs to be at minimum the maximum (MNK/WG) values above.
auto m_max = std::max(64, m);
auto m_max = std::max(256, m);
auto n_max = std::max(64, n);
auto k_max = std::max(32, k);
auto k_max = std::max(64, k);

auto at_size = batch_size
* next_power_of_two(k_max) * next_power_of_two(m_max);
Expand Down

0 comments on commit bf17515

Please sign in to comment.