fixing vector shifting
@@ -1100,9 +1100,9 @@ class KernelWriterSource(KernelWriter):
% (tP["tensorChar"], tP["tileChar"], l, s )
kStr += " = ("
kStr += " globalReadOffset%s%s_%u_%u" \
- % (tP["tensorChar"], tP["tileChar"], l, 0 )
+ % (tP["tensorChar"], tP["tileChar"], l, s )
kStr += " > "
- kStr += "size%s%s" % (tP["tileChar"], "-LOAD_VECTOR_WIDTH_%s"%tP["tensorChar"] if tP["rtv"] else "")
+ kStr += "size%s%s" % (tP["tileChar"], "-LOAD_VECTOR_WIDTH_%s+%u"%(tP["tensorChar"], s) if tP["rtv"] else "")
kStr += ") ? "
kStr += "size%s%s" % (tP["tileChar"], "-LOAD_VECTOR_WIDTH_%s+%u"%(tP["tensorChar"], s) if tP["rtv"] else "")
kStr += " : "
