[Beignet] [PATCH] Fix untyped write random fail bug.
Yang Rong
rong.r.yang at intel.com
Fri Aug 9 01:27:02 PDT 2013
When run async copy conformance test, int, uint, float will random fail.
It is caused by untyped write's bti, just set the bti same as untyped read.
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
backend/src/backend/gen_insn_selection.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp
index d4be8bf..a21687d 100644
--- a/backend/src/backend/gen_insn_selection.cpp
+++ b/backend/src/backend/gen_insn_selection.cpp
@@ -1957,7 +1957,7 @@ namespace gbe
GenRegister addr;
vector<GenRegister> value(valueNum);
- addr = GenRegister::retype(sel.selReg(insn.getSrc(addrID)), GEN_TYPE_F);;
+ addr = GenRegister::retype(sel.selReg(insn.getSrc(addrID)), GEN_TYPE_F);
for (uint32_t valueID = 0; valueID < valueNum; ++valueID)
value[valueID] = GenRegister::retype(sel.selReg(insn.getValue(valueID)), GEN_TYPE_F);
sel.UNTYPED_WRITE(addr, value.data(), valueNum, bti);
@@ -2008,17 +2008,17 @@ namespace gbe
{
using namespace ir;
const AddressSpace space = insn.getAddressSpace();
- const uint32_t bti = space == MEM_LOCAL ? 0xfe : 0x01;
+ //const uint32_t bti = space == MEM_LOCAL ? 0xfe : 0x01;
const Type type = insn.getValueType();
const uint32_t elemSize = getByteScatterGatherSize(type);
if (insn.isAligned() == true && elemSize == GEN_BYTE_SCATTER_QWORD)
- this->emitWriteFloat64(sel, insn, bti);
+ this->emitWriteFloat64(sel, insn, space == MEM_LOCAL ? 0xfe : 0x00);
else if (insn.isAligned() == true && elemSize == GEN_BYTE_SCATTER_DWORD)
- this->emitUntypedWrite(sel, insn, bti);
+ this->emitUntypedWrite(sel, insn, space == MEM_LOCAL ? 0xfe : 0x00);
else {
const GenRegister address = sel.selReg(insn.getAddress());
const GenRegister value = sel.selReg(insn.getValue(0));
- this->emitByteScatter(sel, insn, elemSize, address, value, bti);
+ this->emitByteScatter(sel, insn, elemSize, address, value, space == MEM_LOCAL ? 0xfe : 0x01);
}
return true;
}
--
1.7.10.4
More information about the Beignet
mailing list