xubingyue / softart

Automatically exported from code.google.com/p/softart
Other
0 stars 0 forks source link

Limitations about memory i/o instructions and ddx/ddy with branch. #114

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Description:
  As title.

Original issue reported on code.google.com by wuye9036 on 7 Nov 2011 at 9:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
1. Sample(), SampleBias(), SampleCmp() call ddx/ddy. They are not allowed 
inside branch.
2. SampleLevel(), SampleGrad(), SampleCmpLevelZero(), Load() work with branch.
3. A package runs in SIMD. It flatten the branch when needed.

Original comment by minmin.gong on 28 Nov 2011 at 3:44

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 28 Nov 2011 at 2:47

GoogleCodeExporter commented 8 years ago
The hardware way is:
1. Divide a stream into packages.
2. Elements inside a package runs in SIMD. Branches in a package are flattened 
(Loops are unrolled). Both if and else block are run and mask the results.
3. Branches between packages are in real branch. No performance penalty here.
4. DDX/DDY are calculated inside a package.

We can also follow these rules. It's the simplest and efficient way for 
branching/looping.

Original comment by minmin.gong on 29 Nov 2011 at 8:54

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 14 Dec 2011 at 9:00

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 14 Dec 2011 at 9:03

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 15 Dec 2011 at 3:15

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 5 Mar 2012 at 12:20

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 7 Mar 2012 at 3:08

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 13 Dec 2012 at 4:28

GoogleCodeExporter commented 8 years ago

Original comment by wuye9036 on 13 Dec 2012 at 5:37