-
Notifications
You must be signed in to change notification settings - Fork 42
Optimize work_group reduce for GroupNorm Forward #1688
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: main
Are you sure you want to change the base?
Conversation
|
||
[[intel::reqd_sub_group_size(SIMD)]] void operator()( | ||
sycl::nd_item<1> item) const { | ||
const int64_t i = item.get_group(0); | ||
WelfordOp welford_op = {/*correction=*/0, /*take_sqrt=*/false, item}; | ||
WelfordOp welford_op = {/*correction=*/0, /*take_sqrt=*/false}; |
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.
Where is the nd_item
object?
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.
WelfordOpXPU is replaced by WelfordOp, which does not need item as a pamameter.
@xytintel , @yucai-intel , may I know which workload drives such an optimization? |
|
Optimized the calculation of data on shared memory in GroupReduceWithoutBroadcast, so that the performance of GroupNorm Forward when shape=(1024, 128, 32, 32) is improved by 20+% (latency 2700+ms->~2000ms).
