Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
fajin-corp committed Jan 22, 2025
1 parent b2b47c8 commit a71f736
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions onnxruntime/contrib_ops/cpu/bert/gqa_attention_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ class GQAAttentionBase {
math::GemmEx<float, ThreadPool>(CblasNoTrans, CblasTrans, sequence_length, total_seqlen, head_size, alpha, q,
static_cast<int>(head_size), k, static_cast<int>(head_size), 0.0f /*bata*/,
output, static_cast<int>(present_buffer_sequence_length), nullptr);
// TODO(fajin): update later
// } else if (MlasHGemmSupported(CblasNoTrans, CblasTrans)) {
// MlasGemm(CblasNoTrans, CblasTrans, sequence_length, total_seqlen, head_size,
// q, static_cast<int>(head_size), k, static_cast<int>(head_size), output,
// static_cast<int>(present_buffer_sequence_length), alpha, 0.0f /*beta*/, nullptr);
// TODO(fajin): update later
// } else if (MlasHGemmSupported(CblasNoTrans, CblasTrans)) {
// MlasGemm(CblasNoTrans, CblasTrans, sequence_length, total_seqlen, head_size,
// q, static_cast<int>(head_size), k, static_cast<int>(head_size), output,
// static_cast<int>(present_buffer_sequence_length), alpha, 0.0f /*beta*/, nullptr);
} else {
size_t bytes = head_size * (sequence_length + total_seqlen) * sizeof(float);
auto q_k_fp32 = allocator->Alloc(bytes);
Expand Down
6 changes: 6 additions & 0 deletions onnxruntime/core/mlas/lib/halfgemm_kernel_neon_fp16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Module Name:

#include <arm_neon.h>

// Check if float16_t is defined, if not, define it
#ifndef __FLT16_MIN__
#define __FLT16_MIN__ 6.103515625e-05F16
typedef __fp16 float16_t;
#endif

#include "halfgemm.h"
#include "fp16_common.h"

Expand Down

0 comments on commit a71f736

Please sign in to comment.