-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[GPU] Set minimum memory of count for reduce mean mode of scatter_elements_update, fix typos and remove space #30491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
src/plugins/intel_gpu/src/kernel_selector/cl_kernels/scatter_elements_update_ref.cl
Show resolved
Hide resolved
__local int count_v[1]; | ||
__local int count_k[COUNT_LIMIT/64]; | ||
__local int count_v[COUNT_LIMIT/64]; | ||
count_length = COUNT_LIMIT/64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about implementing it from jitter-side? I think that will be clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix was implemented from jitter-side as you commented.
Thanks for your comment.
53c2aa7
to
dd8ef87
Compare
@@ -201,6 +201,7 @@ KernelsData ScatterElementsUpdateKernelRef::GetKernelsData(const Params& params) | |||
if (i == 1) { | |||
cldnn_jit.AddConstant(MakeJitConstant("IS_SECOND_ITER", "true")); | |||
cldnn_jit.AddConstant(MakeJitConstant("COUNT_LIMIT", params.engineInfo.maxLocalMemSize)); | |||
cldnn_jit.AddConstant(MakeJitConstant("COUNT_MINIMUM", params.engineInfo.maxLocalMemSize/64)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
What does it mean that COUNT_LENGTH==0? Then I guess total workitem size is just 0 and no code will be executed. Isn't it?
-
what about just setting
COUNT_LENGTH = dispatchData.gws[0] * dispatchData.gws[1] * dispatchData.gws[2] if dispatchData.gws[0] * dispatchData.gws[1] * dispatchData.gws[2] != 0 else COUNT_MINIMUM
? Then you don't need to introduce additional variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running, COUNT_LENGTH = 0 if shape agnostic kernel is selected. So the original code has [1] in case of shape agnostic kernel, and it is fixed to [1k].
…ve redundant spaces
…ments_update and move the fix to jitter-side
Details:
Tickets: