Skip to content

Commit

Permalink
integrate mkl bmm into benchmarker
Browse files Browse the repository at this point in the history
  • Loading branch information
simon2 committed Jun 12, 2021
1 parent 3fff1b3 commit 3fd6d73
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 3 additions & 4 deletions benchmarker/kernels/batchmatmul/args.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ struct Options {
};

Options parse_args(const int argc, char *argv[]) {
if (argc != 7)
if (argc != 6)
{
std::cerr << "provide precision, m, n, k, batch_size, nb_epoch as command line parameters\n";
std::cerr << "provide precision, m, n, k, nb_epoch as command line parameters\n";
std::cerr << "got " << argc << " parameters\n";
exit(-1);
}
Expand All @@ -25,8 +25,7 @@ Options parse_args(const int argc, char *argv[]) {
options.cnt_rows_A_rows_C = atoi(argv[2]);
options.cnt_cols_A_rows_B = atoi(argv[3]);
options.cnt_cols_B_cols_C = atoi(argv[4]);
options.batch_size = atoi(argv[5]);
options.nb_epoch = atoi(argv[6]);
options.nb_epoch = atoi(argv[5]);
return options;
}

Expand Down
2 changes: 2 additions & 0 deletions benchmarker/kernels/batchmatmul/mkl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def get_kernel(params):
return None
4 changes: 2 additions & 2 deletions benchmarker/kernels/batchmatmul/mkl/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
using namespace std::chrono;

int main(int argc, char * argv[]) {
size_t m, n, k, batch_size;
size_t m, n, k;
size_t batch_size = 100; // todo(bai): a parameter should go here instead a constant
float **A, **B, **C;
double dtime;
Options options = parse_args(argc, argv);
// parse_args(argc, argv, precision, m, k, n);
m = options.cnt_rows_A_rows_C;
n = options.cnt_cols_A_rows_B;
k = options.cnt_cols_B_cols_C;
batch_size = options.batch_size;
get_batched_matrices<float>(m, k, n, A, B, C, batch_size);
const float alpha = 1;
const float beta = 0;
Expand Down

0 comments on commit 3fd6d73

Please sign in to comment.