[Beignet] [PATCH v2 1/2] [OCL20] fix workgroup_broadcast instruction debug mode assert.

Yang, Rong R rong.r.yang at intel.com
Mon Dec 14 22:14:08 PST 2015


In face, fam is same as fn.getPointerFamily(), I change it manually and push them to master and OCL20.

> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> xionghu.luo at intel.com
> Sent: Tuesday, December 15, 2015 15:40
> To: beignet at lists.freedesktop.org
> Cc: Luo, Xionghu
> Subject: [Beignet] [PATCH v2 1/2] [OCL20] fix workgroup_broadcast
> instruction debug mode assert.
> 
> From: Luo Xionghu <xionghu.luo at intel.com>
> 
> the workgoup related parameter of the workgroup_broadcast function is
> FAMILY_QWORD.
> 
> v2: set the parameter according to the pointer family.
> ---
>  backend/src/ir/instruction.cpp | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/backend/src/ir/instruction.cpp b/backend/src/ir/instruction.cpp
> index 3370935..71b6230 100644
> --- a/backend/src/ir/instruction.cpp
> +++ b/backend/src/ir/instruction.cpp
> @@ -1314,7 +1314,14 @@ namespace ir {
>              whyNot = "Wrong number of source.";
>              return false;
>            } else {
> -            const RegisterFamily fam = FAMILY_DWORD;
> +            const ir::RegisterFamily pointerFamily = fn.getPointerFamily();
> +            RegisterFamily fam;
> +            if (pointerFamily == ir::FAMILY_DWORD) {
> +              fam = FAMILY_DWORD;
> +            }
> +            else {
> +              fam = FAMILY_QWORD;
> +            }
>              for (uint32_t srcID = 1; srcID < this->srcNum; ++srcID) {
>                const Register regID = fn.getRegister(src, srcID);
>                if (UNLIKELY(checkRegisterData(fam, regID, fn, whyNot) == false))
> --
> 2.1.4
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list