Skip to content

Commit

Permalink
gpu: ocl: ip: handle unimplemented preferred_gpu_threads_per_eu query
Browse files Browse the repository at this point in the history
  • Loading branch information
petercad authored and karturov committed Nov 10, 2022
1 parent 4fd5ab2 commit 12ec4e3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/gpu/ocl/gemm_inner_product.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,12 @@ struct gemm_inner_product_bwd_weights_t : public gpu_primitive_t {
&reduction_bias_md, 0.0f, 0.0f));
primitive_attr_t reduction_attr;
int threads_per_eu;
CHECK(gemm_pd_->query(query::preferred_gpu_threads_per_eu, 0,
&threads_per_eu));
reduction_attr.set_gpu_attr(
gpu_primitive_attr_t(threads_per_eu));
auto status
= gemm_pd_->query(query::preferred_gpu_threads_per_eu,
0, &threads_per_eu);
if (status == status::success)
reduction_attr.set_gpu_attr(
gpu_primitive_attr_t(threads_per_eu));
dnnl_primitive_desc_iterator it(engine,
(op_desc_t *)&reduction_d, &reduction_attr, nullptr);
if (!it.is_initialized()) return status::out_of_memory;
Expand Down

0 comments on commit 12ec4e3

Please sign in to comment.