Skip to content

Commit

Permalink
fix VERBOSE; Apple still not working for SGEMM
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhammond committed Apr 15, 2024
1 parent 08c65b3 commit 29830d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cxx11/dgemm-cblas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ int main(int argc, char * argv[])
if (residuum < epsilon) {
#if VERBOSE
std::cout << "Reference checksum = " << reference << "\n"
<< "Actual checksum = " << checksum << std::endl;
<< "Residuum = " << residuum << std::endl;
#endif
std::cout << "Solution validates" << std::endl;
auto avgtime = gemm_time/iterations/matrices;
Expand All @@ -323,10 +323,10 @@ int main(int argc, char * argv[])
std::cout << "Reference checksum = " << reference << "\n"
<< "Residuum = " << residuum << std::endl;
#if VERBOSE
std::cout << "i, j, A, B, C, D" << std::endl;
std::cout << "i, j, A, B, C" << std::endl;
for (int i=0; i<order; ++i)
for (int j=0; j<order; ++j)
std::cout << i << "," << j << " = " << A[i*order+j] << ", " << B[i*order+j] << ", " << C[i*order+j] << ", " << D[i*order+j] << "\n";
std::cout << i << "," << j << " = " << A[0][i*order+j] << ", " << B[0][i*order+j] << ", " << C[0][i*order+j] << "\n";
std::cout << std::endl;
#endif
return 1;
Expand Down
6 changes: 3 additions & 3 deletions Cxx11/sgemm-cblas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ int main(int argc, char * argv[])
if (residuum < epsilon) {
#if VERBOSE
std::cout << "Reference checksum = " << reference << "\n"
<< "Actual checksum = " << checksum << std::endl;
<< "Residuum = " << residuum << std::endl;
#endif
std::cout << "Solution validates" << std::endl;
auto avgtime = gemm_time/iterations/matrices;
Expand All @@ -324,10 +324,10 @@ int main(int argc, char * argv[])
std::cout << "Reference checksum = " << reference << "\n"
<< "Residuum = " << residuum << std::endl;
#if VERBOSE
std::cout << "i, j, A, B, C, D" << std::endl;
std::cout << "i, j, A, B, C" << std::endl;
for (int i=0; i<order; ++i)
for (int j=0; j<order; ++j)
std::cout << i << "," << j << " = " << A[i*order+j] << ", " << B[i*order+j] << ", " << C[i*order+j] << ", " << D[i*order+j] << "\n";
std::cout << i << "," << j << " = " << A[0][i*order+j] << ", " << B[0][i*order+j] << ", " << C[0][i*order+j] << "\n";
std::cout << std::endl;
#endif
return 1;
Expand Down

0 comments on commit 29830d7

Please sign in to comment.