[Beignet] [PATCH] GBE: fix a src/dst register reuse bug.

Pan, Xiuli xiuli.pan at intel.com
Wed Dec 21 03:24:32 UTC 2016


I recheck the case, the origin asm is:
So the problem is that mad need to spilt. And the liveness for these complex instruction should not be set to be reuseable.

(    2606)  mad(8)          g4<1>:F         g4.1<0,1,0>:F   g127.7<0,1,0>:F g46:F { align16 WE_normal 1Q };
(    2608)  mad(8)          g5<1>:F         g4.1<0,1,0>:F   g127.7<0,1,0>:F g47:F { align16 WE_normal 2Q };

From: Ruiling Song [mailto:ruiling.song83 at gmail.com]
Sent: Wednesday, December 21, 2016 10:59 AM
To: Pan, Xiuli <xiuli.pan at intel.com>
Cc: Song, Ruiling <ruiling.song at intel.com>; Yang, Rong R <rong.r.yang at intel.com>; beignet at lists.freedesktop.org
Subject: Re: [Beignet] [PATCH] GBE: fix a src/dst register reuse bug.

2016-12-21 10:43 GMT+08:00 Pan, Xiuli <xiuli.pan at intel.com<mailto:xiuli.pan at intel.com>>:
I got the point.
In some case, such as block read gemm. We may get 16 mad with g4, thus there may be some other mad using g4.2 or g4.3 later.
If we reuse the g4, the g4.2 or g4.3 may be overwrite. In this case may be g4.1 is just a scalar value, and g4.2 or g4.* can be some other scalar value. This fix check if the src and dst is all uniform. It should fix this case.
but the original code only change the liveness of the g4.1 instead of directly re-use the source.
So the problems is that liveness is wrong for other scalar registers?

- Ruiling
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org<mailto:beignet-bounces at lists.freedesktop.org>] On Behalf Of Song, Ruiling
Sent: Tuesday, December 20, 2016 8:28 PM
To: Yang, Rong R <rong.r.yang at intel.com<mailto:rong.r.yang at intel.com>>; beignet at lists.freedesktop.org<mailto:beignet at lists.freedesktop.org>
Cc: Yang, Rong R <rong.r.yang at intel.com<mailto:rong.r.yang at intel.com>>
Subject: Re: [Beignet] [PATCH] GBE: fix a src/dst register reuse bug.



> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org<mailto:beignet-bounces at lists.freedesktop.org>] On Behalf
> Of Yang Rong
> Sent: Tuesday, December 20, 2016 4:47 PM
> To: beignet at lists.freedesktop.org<mailto:beignet at lists.freedesktop.org>
> Cc: Yang, Rong R <rong.r.yang at intel.com<mailto:rong.r.yang at intel.com>>
> Subject: [Beignet] [PATCH] GBE: fix a src/dst register reuse bug.
>
> For case:
>  mad(8)          g4<1>:F         g4.1<0,1,0>:F   g127.7<0,1,0>:F g46:F
> src0 is uniform, dst is non-uniform, dst can't reuse the src0.
why g4.0 cannot be reused here? What's wrong here?

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org<mailto:Beignet at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/beignet
_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org<mailto:Beignet at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/beignet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/beignet/attachments/20161221/49ad18c8/attachment-0001.html>


More information about the Beignet mailing list