[Beignet] [PATCH] Fix a HSW regression.

Zhigang Gong zhigang.gong at linux.intel.com
Thu Oct 16 16:58:15 PDT 2014


Right, all this type of operations are potentially causing inconsistence.
We need to make them get type from one source rather than set type from
two independent code path, or we need to set an unified sanity check to make
sure each time we set a type to the register, we do not break the rule.

We may do it in the future.

On Thu, Oct 16, 2014 at 08:13:02AM +0000, Yang, Rong R wrote:
> Ok, I will change the code that use slmoffset.
> 
> For sanity check,  maybe not only special register. When doing some operations that change type and stride,  such as retype, unpack, also very dangerous. Ideally, there is a common way to check these usage.
> 
> -----Original Message-----
> From: Zhigang Gong [mailto:zhigang.gong at linux.intel.com] 
> Sent: Thursday, October 16, 2014 14:30
> To: Yang, Rong R
> Cc: beignet at lists.freedesktop.org
> Subject: Re: [Beignet] [PATCH] Fix a HSW regression.
> 
> Good catch yang rong, but this doesn't look like a regression itself.
> It has been there from the beginning. And considering that the total SLM size is only 64K, so a unsigned WORD should be good enough for it right?
> 
> We may need to fix the related code in the gen_insn_selection.cpp and gen75_context.cpp.
> 
> Last time I visited these special register allocations/definitions, I thought we lack of sanity check here and may allocate incorrect register space at backend which is very hard to debug.
> 
> We may need to add some sanity check between here and the actual special register allocation and usage places to make sure those registers are allocated correctly.
> 
> Any thought?
> 
> 
> On Thu, Oct 16, 2014 at 11:07:37AM +0800, Yang Rong wrote:
> > slmoffset use as DWORD register, but declare WORD, fix it.
> > 
> > Signed-off-by: Yang Rong <rong.r.yang at intel.com>
> > ---
> >  backend/src/ir/profile.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/backend/src/ir/profile.cpp b/backend/src/ir/profile.cpp 
> > index 57cce4b..295b612 100644
> > --- a/backend/src/ir/profile.cpp
> > +++ b/backend/src/ir/profile.cpp
> > @@ -83,7 +83,7 @@ namespace ir {
> >        DECL_NEW_REG(FAMILY_DWORD, zero, 1);
> >        DECL_NEW_REG(FAMILY_DWORD, one, 1);
> >        DECL_NEW_REG(FAMILY_WORD, retVal, 1);
> > -      DECL_NEW_REG(FAMILY_WORD, slmoffset, 1);
> > +      DECL_NEW_REG(FAMILY_DWORD, slmoffset, 1);
> >        DECL_NEW_REG(FAMILY_DWORD, printfbptr, 1);
> >        DECL_NEW_REG(FAMILY_DWORD, printfiptr, 1);
> >        DECL_NEW_REG(FAMILY_DWORD, invalid, 1);
> > --
> > 1.9.1
> > 
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list