Skip to content

Commit

Permalink
src: gpu: jit: use emulation for unaligned f64 mov
Browse files Browse the repository at this point in the history
  • Loading branch information
kealan-barbieri authored and echeresh committed Nov 1, 2022
1 parent ae9d075 commit 6705403
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/gpu/jit/gemm/emulation.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2020-2021 Intel Corporation
* Copyright 2020-2022 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -207,6 +207,10 @@ struct EmulationImplementation {
bool dstQ = isQW(dst);
bool s0Q = isQW(src0);
bool s0D = isDW(src0);
bool isDF = (src0.getType() == DataType::df
&& dst.getType() == DataType::df);
bool unaligned = (mod.getExecSize() > 1 && src0.getHS() != 0
&& src0.getOffset() != dst.getOffset());

if ((dstQ && s0D) && strategy.emulate64) {
if (src0.getNeg()) stub();
Expand All @@ -219,7 +223,8 @@ struct EmulationImplementation {
} else {
g.asr(mod, dstHi, dstLo, uint16_t(31));
}
} else if ((dstQ || s0Q) && strategy.emulate64) {
} else if ((isDF && unaligned && g.hardware >= ngen::HW::XeHP)
|| ((dstQ || s0Q) && (strategy.emulate64))) {
if (dstQ != s0Q) stub();

auto mod2x = mod;
Expand Down

0 comments on commit 6705403

Please sign in to comment.