Skip to content
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

Build fix for Android #2290

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/models/llama2/custom_ops/op_sdpa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ inline void fill_stub(scalar_t* data, scalar_t val, int64_t size) {
for (; d < size - (size % Vec::size()); d += Vec::size()) {
data_vec.store(data + d);
}
#if !defined(_MSC_VER) && !defined(COMPILING_FOR_MIN_SIZE)
#if !defined(_MSC_VER) && !defined(COMPILING_FOR_MIN_SIZE) && \
!defined(__ANDROID__)
#pragma unroll
#endif
for (; d < size; d++) {
Expand Down Expand Up @@ -249,7 +250,7 @@ void cpu_flash_attention(
ET_CHECK_MSG(
attn_mask.value().size(1) == kvSize,
"attn_mask shape mismatch"
"attn_mask.size(1)=%ld kvSize=%" PRId64,
"attn_mask.size(1)=%zd kvSize=%" PRId64,
attn_mask.value().size(1),
kvSize);
}
Expand Down Expand Up @@ -578,7 +579,7 @@ bool validate_cache_params(
"start_post + seq_length must be less than max seq length supported by key cache."
"start pos: %" PRId64 ", seq_length: %" PRId64
"."
"key cache size: %ld",
"key cache size: %zd",
start_pos,
seq_length,
k_cache.size(2));
Expand All @@ -588,7 +589,7 @@ bool validate_cache_params(
"start_post + seq_length must be less than max seq length supported by key cache."
"start pos: %" PRId64 ", seq_length: %" PRId64
"."
"value cache size: %ld",
"value cache size: %zd",
start_pos,
seq_length,
v_cache.size(2));
Expand Down
Loading