From 67054032e4b1b4eae11f006e3857fe20a0d7b16a Mon Sep 17 00:00:00 2001 From: "Barbieri, Kealan" Date: Mon, 19 Sep 2022 15:31:10 -0700 Subject: [PATCH] src: gpu: jit: use emulation for unaligned f64 mov --- src/gpu/jit/gemm/emulation.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gpu/jit/gemm/emulation.hpp b/src/gpu/jit/gemm/emulation.hpp index 66eeceaa0c7..6e75f64f22b 100644 --- a/src/gpu/jit/gemm/emulation.hpp +++ b/src/gpu/jit/gemm/emulation.hpp @@ -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. @@ -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(); @@ -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;