cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ryta1203
Journeyman III

Out of Order Clause Execution?

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?

 

0 Likes
6 Replies

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

0 Likes

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?

0 Likes

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

0 Likes

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.

0 Likes

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

0 Likes

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.

0 Likes