-
Notifications
You must be signed in to change notification settings - Fork 13.9k
ggml-hexagon: fix rope failure at test-backend-ops
#17565
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
ggml/src/ggml-hexagon/htp/rope-ops.c
Outdated
| } | ||
|
|
||
| // TODO: use simd to speed up the remaining elements copy | ||
| memcpy(dst_data_loc, src_loc, (ne0 - rope_ctx->n_dims) * sizeof(float)); |
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.
QQ: did we have simd acceleration in the memcpy?
| const uint64_t name##_end_cycles = HAP_perf_get_qtimer_count(); \ | ||
| FARF(HIGH, __VA_ARGS__, (unsigned) HAP_perf_qtimer_count_to_us(name##_end_cycles - name##_start_cycles)); \ | ||
| } while (0) | ||
|
|
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.
This macro provides a convenient way to handle profiling logs within the NPU. It allows profiling logs to be easily disabled via a compiler flag.
| } | ||
| if (ir > ir1) { | ||
| break; | ||
| } |
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.
Those two inner if statements can be merged into the for loop's condition.
Changes
Fix
ropeop implementation, after these changes, the impl correctly handles the operation and passes allropetests.Before
After