Skip to content

Commit

Permalink
cpu: gemm: check for nocopy on sequential mode
Browse files Browse the repository at this point in the history
We should check for nocopy even for single threaded mode.
  • Loading branch information
aaraujom committed Oct 5, 2019
1 parent 0125f28 commit cfc5c3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cpu/gemm/gemm_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1322,11 +1322,6 @@ static mkldnn_status_t gemm_threading_driver(
}
get_omp_thread_count<c_type>(arg->m, arg->n, arg->k, &nthr);

if (nthr == 1) {
return gemm_kernel_driver(arg->m, arg->n, arg->k, arg->a, arg->b,
arg->c, arg->co, arg);
}

if ((data_traits<a_type>::data_type == data_type::f32) &&
nocopy_checker(nthr, arg->transa, arg->transb, arg->m, arg->n,
arg->k, arg->lda, arg->ldb, arg->ldc))
Expand All @@ -1336,6 +1331,11 @@ static mkldnn_status_t gemm_threading_driver(
(float *) arg->b, arg->ldb,
arg->beta, (float *) arg->c, arg->ldc, NULL);

if (nthr == 1) {
return gemm_kernel_driver(
arg->m, arg->n, arg->k, arg->a, arg->b, arg->c, arg->co, arg);
}

mkldnn_status_t *results = (mkldnn_status_t *) malloc(
sizeof(*results) * nthr * CACHE_LINE_SIZE, PAGE_4K);

Expand Down

0 comments on commit cfc5c3d

Please sign in to comment.