Use cltune::SearchMethod enum instead of int values

This commit is contained in:
mcian 2017-08-09 16:05:25 +02:00
parent 473e814718
commit 0b4aa109f8
2 changed files with 6 additions and 6 deletions

View file

@ -102,9 +102,9 @@ void Xgemm<T>::DoGemm(const Layout layout,
TestMatrixC(c_one, c_two, c_buffer, c_offset, c_ld); TestMatrixC(c_one, c_two, c_buffer, c_offset, c_ld);
// Selects which version of GEMM to run // Selects which version of GEMM to run
const auto m_n_k = static_cast<unsigned long>(m) * static_cast<unsigned long>(n) * const auto m_n_k = static_cast<unsigned long long>(m) * static_cast<unsigned long long>(n) *
static_cast<unsigned long>(k); static_cast<unsigned long long>(k);
const auto do_gemm_direct = (m_n_k < static_cast<unsigned long>(db_["XGEMM_MIN_INDIRECT_SIZE"])); const auto do_gemm_direct = (m_n_k < static_cast<unsigned long long>(db_["XGEMM_MIN_INDIRECT_SIZE"]));
if (do_gemm_direct) { // for small sizes (single kernel) if (do_gemm_direct) { // for small sizes (single kernel)
GemmDirect(m, n, k, alpha, GemmDirect(m, n, k, alpha,
a_buffer, a_offset, a_ld, b_buffer, b_offset, b_ld, beta, a_buffer, a_offset, a_ld, b_buffer, b_offset, b_ld, beta,

View file

@ -63,7 +63,7 @@ class TuneXgemm {
static double DefaultInfluenceGlobalPSO(){ return 0.1; } static double DefaultInfluenceGlobalPSO(){ return 0.1; }
static double DefaultInfluenceLocalPSO(){ return 0.3; } static double DefaultInfluenceLocalPSO(){ return 0.3; }
static double DefaultInfluenceRandomPSO(){ return 0.6; } static double DefaultInfluenceRandomPSO(){ return 0.6; }
static size_t DefaultHeuristic(){ return size_t{3};} // PSO static size_t DefaultHeuristic(){ return (size_t)cltune::SearchMethod::PSO;} // PSO
static double DefaultMaxTempAnn(){ return 1.0;} static double DefaultMaxTempAnn(){ return 1.0;}
// Describes how to obtain the sizes of the buffers // Describes how to obtain the sizes of the buffers
@ -187,7 +187,7 @@ class TuneXgemm {
// Multi Search Strategy is enable // Multi Search Strategy is enable
if( args.multi_search_strategy){ if( args.multi_search_strategy){
if( V == 1){ if( V == 1){
return size_t{0}; return (size_t) cltune::SearchMethod::FullSearch;
} }
else{ else{
return args.heuristic_selection; return args.heuristic_selection;
@ -197,7 +197,7 @@ class TuneXgemm {
// Use full-search to explore all parameter combinations or random-search to search only a part of // Use full-search to explore all parameter combinations or random-search to search only a part of
// the parameter values. The fraction is set as a command-line argument. // the parameter values. The fraction is set as a command-line argument.
if (args.fraction == 1.0 || args.fraction == 0.0) { if (args.fraction == 1.0 || args.fraction == 0.0) {
return size_t{0}; // Full search return (size_t) cltune::SearchMethod::FullSearch;
} }
else { else {
return args.heuristic_selection; return args.heuristic_selection;