6 Replies Latest reply on Sep 12, 2010 12:20 AM by ryta1203

    Out of Order Clause Execution?

    ryta1203

      Can clauses execute out of order?

      For example, if I have 2 ALU clauses, in order A, B and 2 fetch clauses X, Y

      A is dependent on X and Y

      B is dependent on X

      Once X is executed and the data is gotten can B go ahead an execute? providing there is not data dependency between A and B? Is this they way the scheduler works? Does it allow for out of order clause execution?

       

        • Out of Order Clause Execution?
          jeff_golds

           

          Originally posted by: ryta1203 Can clauses execute out of order?

           

          For example, if I have 2 ALU clauses, in order A, B and 2 fetch clauses X, Y

           

          A is dependent on X and Y

           

          B is dependent on X

           

          Once X is executed and the data is gotten can B go ahead an execute? providing there is not data dependency between A and B? Is this they way the scheduler works? Does it allow for out of order clause execution?

           

           

           

          You should be able to get this information from the Stream Kernel Analyser as it's going to depend on how the code was compiled.

          If it's compiled as X->B->Y->A then you're fine.

          Jeff

            • Out of Order Clause Execution?
              ryta1203

              So you are saying no, that it doesn't allow out of order execution of clauses and that clauses are executed sequentially in order of the way they are compiled? EDIT: So the "out of order" execution of operations is done by the compiler and NOT by the scheduler?

                • Out of Order Clause Execution?
                  jeff_golds

                   

                  Originally posted by: ryta1203 So you are saying no, that it doesn't allow out of order execution of clauses and that clauses are executed sequentially in order of the way they are compiled? EDIT: So the "out of order" execution of operations is done by the compiler and NOT by the scheduler?

                   

                   

                  The GPU is in-order.  The HW can't tell that there's no dependancy within a clause.

                  Jeff

                    • Out of Order Clause Execution?
                      ryta1203

                      I wasn't talking about "within" a clause, but interclause (between clauses).

                      There has to be recognition of data dependency, unless every ALU clause automatically waits for the TEX clause before it to finish before continuing.

                      I'm not sure you are understanding my question.

                        • Out of Order Clause Execution?
                          jeff_golds

                           

                          Originally posted by: ryta1203 I wasn't talking about "within" a clause, but interclause (between clauses).

                           

                          There has to be recognition of data dependency, unless every ALU clause automatically waits for the TEX clause before it to finish before continuing.

                           

                          I'm not sure you are understanding my question.

                           

                          I understand fully.  The HW executes in order.  So for a single thread, you can be sure that clauses execute in the way they are compiled.  So, yes, an ALU clause will wait for the previous TEX clause to complete before executing.  The HW handles this by putting the thread (wavefront) that issued the TEX clause to sleep and moving on to the next wavefront on that SIMD.  In this way, we hide memory latency as long as there's enough work queued up.

                          Jeff

                            • Out of Order Clause Execution?
                              ryta1203

                               

                              Originally posted by: jeff_golds
                              Originally posted by: ryta1203 I wasn't talking about "within" a clause, but interclause (between clauses).

                               

                              There has to be recognition of data dependency, unless every ALU clause automatically waits for the TEX clause before it to finish before continuing.

                               

                              I'm not sure you are understanding my question.

                               

                              I understand fully.  The HW executes in order.  So for a single thread, you can be sure that clauses execute in the way they are compiled.  So, yes, an ALU clause will wait for the previous TEX clause to complete before executing.  The HW handles this by putting the thread (wavefront) that issued the TEX clause to sleep and moving on to the next wavefront on that SIMD.  In this way, we hide memory latency as long as there's enough work queued up.

                              Jeff

                              Ok, just checking. This adds up with some tests I ran using CAL/IL and spreading the dependencies out across different clauses.