Skip to content

Commit 623a956

Browse files
committed
used_to_verify_ovms_pipeline
1 parent f5a0261 commit 623a956

File tree

3 files changed

+39
-14
lines changed

3 files changed

+39
-14
lines changed

src/core/include/openvino/core/version.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
* @brief Defines OpenVINO patch version
2020
*/
2121

22-
#define OPENVINO_VERSION_MAJOR 2026
23-
#define OPENVINO_VERSION_MINOR 0
22+
#define OPENVINO_VERSION_MAJOR 2025
23+
#define OPENVINO_VERSION_MINOR 4
2424
#define OPENVINO_VERSION_PATCH 0
2525

2626
namespace ov {

src/plugins/intel_cpu/src/nodes/eltwise.cpp

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -546,20 +546,25 @@ bool Eltwise::isWithBroadcast() {
546546
}
547547

548548
void Eltwise::init() {
549-
// Bf16 saturation handling for gamma parameter when input precision is bf16 to make sure it stays within the valid
550-
// range for bfloat16.
549+
// Bf16 saturation handling for PowerStatic parameters
550+
// to make sure they stay within the valid range for bfloat16.
551551
if (m_attrs.data.algo == Algorithm::EltwisePowerStatic && getOriginalInputPrecisionAtPort(0) == ov::element::bf16) {
552-
const float lowest = static_cast<float>(std::numeric_limits<ov::bfloat16>::lowest());
553-
const float max = static_cast<float>(std::numeric_limits<ov::bfloat16>::max());
554-
auto& gamma = m_attrs.data.gamma;
555-
556-
if (gamma < lowest) {
557-
gamma = lowest;
558-
}
552+
// Use the actual float values corresponding to bfloat16 limits
553+
// 0xFF7F = -65504.0f (lowest), 0x7F7F = 65504.0f (max)
554+
static constexpr float bf16_lowest = -65504.0f;
555+
static constexpr float bf16_max = 65504.0f;
556+
557+
// Helper lambda to clamp parameter values within bf16 range
558+
auto clampBf16Parameter = [&](auto& param) {
559+
if (std::isfinite(param)) {
560+
param = std::clamp(static_cast<float>(param), bf16_lowest, bf16_max);
561+
}
562+
};
559563

560-
if (gamma > max) {
561-
gamma = max;
562-
}
564+
// Clamp all PowerStatic parameters
565+
clampBf16Parameter(m_attrs.data.alpha);
566+
clampBf16Parameter(m_attrs.data.beta);
567+
clampBf16Parameter(m_attrs.data.gamma);
563568
}
564569
}
565570

src/plugins/intel_cpu/src/transformations/cpu_opset/x64/pass/mlp_fusion.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,26 @@ ov::intel_cpu::MLPFusionPass::MLPFusionPass() {
122122
matcher_pass_callback callback = [OV_CAPTURE_CPY_AND_THIS](ov::pass::pattern::Matcher& m) {
123123
const auto& pattern_map = m.get_pattern_value_map();
124124
auto root = m.get_match_root();
125+
126+
// Verify VariadicSplit output[1] connects to Multiply (up branch) in combined mode
127+
if (pattern_map.count(gate_up_proj_split)) {
128+
auto mlp_gated_up_node = pattern_map.at(mlp_gated_up).get_node_shared_ptr();
129+
auto input0 = mlp_gated_up_node->input_value(0);
130+
auto input1 = mlp_gated_up_node->input_value(1);
131+
132+
bool found_valid_up_connection = false;
133+
134+
if (input0.get_node() == pattern_map.at(gate_up_proj_split).get_node() && input0.get_index() == 1) {
135+
found_valid_up_connection = true;
136+
}
137+
if (input1.get_node() == pattern_map.at(gate_up_proj_split).get_node() && input1.get_index() == 1) {
138+
found_valid_up_connection = true;
139+
}
140+
141+
if (!found_valid_up_connection) {
142+
return false;
143+
}
144+
}
125145
auto src = pattern_map.at(input);
126146
if (!src.get_element_type().is_real()) {
127147
// FakeQuantize, should skip fusion

0 commit comments

Comments
 (0)