Reduce branching in __brick_shift_left
implementation in SYCL backend
#2021
Labels
__brick_shift_left
implementation in SYCL backend
#2021
This issue is being filed based on the following review comment: #1976 (comment)
Potential Performance Issue
The current implementation of
__brick_shift_left
implementation in the SYCL backend performs strided accesses within a loop with a conditional check to ensure we are within bounds at each iteration:The proposed vectorization path in
https://github.com/uxlfoundation/oneDPL/pull/1976
more or less follows the same implementation with the same branching. This likely has some performance hit particularly on GPU architectures as they lack branch prediction. Instead, we should precompute the number of iterations outside the loop and hoist the last iteration after the loop with boundary checking as it may not be a full case.This optimization should be a follow-up to the mentioned PR and should adjust both scalar and vector implementations.
The text was updated successfully, but these errors were encountered: