Skip to content

Commit

Permalink
xe: primitive_conf: avoid conflicting definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
echeresh committed Jan 29, 2025
1 parent 8216003 commit 195b941
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gpu/intel/primitive_conf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void def_offsets(const dim_t offs[4][MAX_NDIMS],
kernel_ctx.define_int(
utils::format("%s_SB%d", str, d), (d < ndims) ? offs[2][d] : 0);
kernel_ctx.define_int(
utils::format("%s_D%d", str, d), (d < ndims) ? offs[3][d] : 0);
utils::format("%s_D%d", str, d), (d < ndims) ? offs[3][d] : 1);
}
}

Expand Down Expand Up @@ -817,9 +817,10 @@ status_t def_attr_info_impl(compute::kernel_ctx_t &kernel_ctx,

kernel_ctx.define_int("WITH_POST_OP", post_ops.len() > 0);

kernel_ctx.define_int("WITH_ELTWISE", attr_info.with_eltwise);
kernel_ctx.define_int("ELTWISE_IDX", attr_info.eltwise_idx);
kernel_ctx.define_int("ELTWISE_ALG", attr_info.eltwise_alg);
if (!kernel_ctx.has_macro("WITH_ELTWISE"))
kernel_ctx.define_int("WITH_ELTWISE", attr_info.with_eltwise);
if (!kernel_ctx.has_macro("ELTWISE_ALG"))
kernel_ctx.define_int("ELTWISE_ALG", attr_info.eltwise_alg);

kernel_ctx.define_int("WITH_SUM", attr_info.with_sum);
kernel_ctx.define_int("SUM_IDX", attr_info.sum_idx);
Expand Down

0 comments on commit 195b941

Please sign in to comment.