expar optimization not working for modarray() instruction
|
|
Bugzilla Link |
973 |
Created on |
Jun 07, 2012 17:06 |
Version |
svn |
OS |
All |
Architecture |
PC |
Extended Description
In the relax_fix.sac program on the repository, a matrix is initialized and goes through several CUDA-compatible relaxation steps:
A = with {
( . <= x <= . ) : 0.0f;
} : genarray( [SIZE1,SIZE2] );
A = modarray(A, [0,1], 500.0f);
A = relax( A, LOOP);
The modarray() instruction causes the array to be copied from the CUDA device to the host, where it has a single value modified, and then the array is shipped back to the CUDA device.
The expar optimization has no effect on the generated code. This seems to me like a fairly obvious place for expar to optimize, as changing a single value can be done redundantly on CUDA.