mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Suppress maybe used uninitialized warning as being false alert (#20886)
### Description <!-- Describe your changes. --> ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> It breaks the python package pipeline. A new run: https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=477415&view=logs&s=d66927fc-650e-5e6f-874c-ae9229c1e7e4 --------- Co-authored-by: Your Name <you@example.com>
This commit is contained in:
parent
4e18344028
commit
ad769f14a8
1 changed files with 9 additions and 0 deletions
|
|
@ -54,6 +54,11 @@ Status QMoE::ComputeInternal(OpKernelContext* context) const {
|
|||
const Tensor* fc3_scales_optional = context->Input<Tensor>(9);
|
||||
const Tensor* fc3_experts_bias_optional = context->Input<Tensor>(10);
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" // Mute "maybe used uninitialized" warning for MoEParameters.
|
||||
#endif
|
||||
|
||||
MoEParameters moe_params;
|
||||
MoEQuantType quant_type = MoEQuantType::UINT4;
|
||||
ORT_RETURN_IF_ERROR(CheckInputs(moe_params, quant_type, input, router_probs, fc1_experts_weights,
|
||||
|
|
@ -135,6 +140,10 @@ Status QMoE::ComputeInternal(OpKernelContext* context) const {
|
|||
reinterpret_cast<int*>(expert_for_source_row.get()), static_cast<int>(moe_params.num_rows),
|
||||
static_cast<int>(moe_params.hidden_size), static_cast<int>(k_), Stream(context));
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue