Skip to content

Commit

Permalink
gpu: jit: conv: reject unsupported xelpg bwd_w f64 cfgs
Browse files Browse the repository at this point in the history
  • Loading branch information
kealan-barbieri authored and karturov committed Mar 27, 2024
1 parent d748d64 commit 0b399ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/gpu/jit/conv/plan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,7 @@ enum class plan_status_t {
invalid_slm_k_slicing,
invalid_slm_layout,
invalid_direct_view,
invalid_c_layout,
};

#define PLAN_CHECK(status) \
Expand Down Expand Up @@ -2287,6 +2288,15 @@ class plan_builder_t {
auto c_prb_layout = c_mapper.map_from_bmnk(abc_kind_t::c,
{bmnk_kind_t::b, bmnk_kind_t::m, bmnk_kind_t::n}, c_layout);

// Reject cfgs that require unsupported f64 fadd emulation vec_size on
// XeLPG. F64 fadd emulation is only reliable with vec_size 8 on XeLPG.
bool requires_fadd
= prb_.is_bwd_w && gemm_schedule_.with_kernel_grid_k_slicing();
if (cfg_.hw().is_xelpg() && requires_fadd && c_layout.elems() % 8 != 0
&& c_type == type_t::f64()) {
return plan_status_t::invalid_c_layout;
}

plan.a_layout = a_layout;
plan.b_layout = b_layout;
plan.c_layout = c_layout;
Expand Down

0 comments on commit 0b399ac

Please sign in to comment.