Skip to content

Commit

Permalink
gpu: intel: jit: codegen: use fencewait() with SLM fence
Browse files Browse the repository at this point in the history
  • Loading branch information
echeresh committed May 23, 2024
1 parent 74fb846 commit b782e13
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gpu/intel/jit/codegen/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,8 @@ class ir_to_ngen_t : public ir_visitor_t {
if (!attr.is_empty())
mod = mod | to_ngen(attr.as<instruction_modifier_attr_t>().mod);

const int dwords = ngen::GRF::bytes(hw) / sizeof(int32_t);
host_->slmfence(mod, tmp, host_->r0);
host_->template mov<int32_t>(dwords, host_->null, tmp);
host_->fencewait();
}

void barrier(const func_call_attr_t &attr) {
Expand All @@ -386,9 +385,8 @@ class ir_to_ngen_t : public ir_visitor_t {
if (!attr.is_empty())
mod = mod | to_ngen(attr.as<instruction_modifier_attr_t>().mod);

const int dwords = ngen::GRF::bytes(hw) / sizeof(int32_t);
host_->slmfence(mod, tmp, host_->r0);
host_->template mov<int32_t>(dwords, host_->null, tmp);
host_->fencewait();
host_->barriermsg(mod, host_->signal_header_);
host_->barrierwait();
}
Expand Down

0 comments on commit b782e13

Please sign in to comment.