Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
amarin16 committed Oct 1, 2024
1 parent a483ca4 commit 19d225a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion onnxruntime/contrib_ops/cpu/skip_layer_norm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Status SkipLayerNorm<T, simplified>::Compute(OpKernelContext* p_ctx) const {
}
}

if (std::is_same_v<decltype(p_output), MLFloat16>) {
if (std::is_same_v<decltype(p_output), MLFloat16*>) {
ConvertFloatBufferToMLFloat16(
reinterpret_cast<float*>(output_buffer), reinterpret_cast<MLFloat16*>(p_output), hidden_size);
delete[] output_buffer;
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cpu/nn/layer_norm_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Status LayerNormImpl::ComputeWithoutContext(
}
}

if (std::is_same_v<decltype(p_output), MLFloat16>) {
if (std::is_same_v<decltype(p_output), MLFloat16*>) {
ConvertFloatBufferToMLFloat16(
reinterpret_cast<float*>(output_buffer), reinterpret_cast<MLFloat16*>(p_output), norm_size);
delete[] output_buffer;
Expand Down

0 comments on commit 19d225a

Please sign in to comment.