Skip to content

ocl_calcOpticalFlowPyrLK optimizations#2566

Merged
opencv-pushbot merged 3 commits intoopencv:masterfrom
krodyush:pullreq/140319-PyrLKOpticalFlow
Apr 8, 2014
Merged

ocl_calcOpticalFlowPyrLK optimizations#2566
opencv-pushbot merged 3 commits intoopencv:masterfrom
krodyush:pullreq/140319-PyrLKOpticalFlow

Conversation

@krodyush
Copy link
Copy Markdown
Contributor

@krodyush krodyush commented Apr 3, 2014

  1. decrease branch number in CL code by replacing them into weights
  2. decrease local mem pressure in reduce operation by using private variables
  3. decrease image sampler pressure by caching data into local memory
  4. remove unnecessary sync point on the HOST side.

check_regression=PyrLK
test_modules=video
build_examples=OFF

1. decrease branch number in CL code by replacing them into weights
2. decrease local mem pressure in reduce operation by using private variables
3. decrease image sampler pressure by caching data into local memory
4. remove unnecessary sync point on the HOST side.
…KOpticalFlow

Conflicts:
	modules/video/src/opencl/pyrlk.cl
@ghost ghost assigned apavlenko Apr 4, 2014
@ghost
Copy link
Copy Markdown

ghost commented Apr 4, 2014

Andrey,

Could you please look at the pull request?

@apavlenko
Copy link
Copy Markdown
Contributor

@krodyush , I see slowdown on AMD GPUs - please make these changes Intel-only.

@krodyush
Copy link
Copy Markdown
Contributor Author

krodyush commented Apr 4, 2014

@apavlenko, Is it possible to know on which AMD GPUs the slowdown is observed?

@apavlenko
Copy link
Copy Markdown
Contributor

dGPU: HD7950 & HD7790,
iGPU: A10-7850K

@krodyush
Copy link
Copy Markdown
Contributor Author

krodyush commented Apr 7, 2014

Thanks for the data. I've reproduced degradation. It looks like the reason was a merge error. I've made a fix. Could you check that degradation is gone?

@apavlenko
Copy link
Copy Markdown
Contributor

👍

@opencv-pushbot opencv-pushbot merged commit 616ec74 into opencv:master Apr 8, 2014
@ilya-lavrenov
Copy link
Copy Markdown
Contributor

@krodyush, this PR introduced the following build errors on my iMac (with AMD card inside):

OpenCL program build log:  -D AMD_DEVICE
<program source>:166:36: error: parameter may not be qualified with an address space
inline void SetPatch(local float IPatchLocal[LSy*GRIDSIZE+2][LSx*GRIDSIZE+2], int TileY, int TileX,
                                   ^
<program source>:199:66: error: parameter may not be qualified with an address space
void ReadPatchIToLocalMem(image2d_t I, float2 Point, local float IPatchLocal[LSy*GRIDSIZE+2][LSx*GRIDSIZE+2])
                                                                 ^
<program source>:237:26: warning: comparison of integers of different signs: 'unsigned int' and 'int'
float wx = ((xid+2*xsize)<c_winSize_x)?1:0;
             ~~~~~~~~~~~ ^~~~~~~~~~~~
<program source>:238:26: warning: comparison of integers of different signs: 'unsigned int' and 'int'
float wy = ((yid+2*ysize)<c_winSize_y)?1:0;
             ~~~~~~~~~~~ ^~~~~~~~~~~~

@krodyush
Copy link
Copy Markdown
Contributor Author

krodyush commented Apr 9, 2014

Is it possible to submit the fix in the same pullrequest or I have to create new one?

@ilya-lavrenov
Copy link
Copy Markdown
Contributor

this PR has already been merged, so you should create a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants