[Snippets] MHA tests: bf16 inputs generation restored (#21250)
This commit is contained in:
parent
1a235ffe79
commit
c50bd2b55f
@ -81,7 +81,9 @@ void MHA::generate_inputs(const std::vector<ngraph::Shape>& targetInputStaticSha
|
||||
for (int i = 0; i < model_inputs.size(); ++i) {
|
||||
const auto& model_input = model_inputs[i];
|
||||
ov::Tensor tensor;
|
||||
tensor = ov::test::utils::create_and_fill_tensor(model_input.get_element_type(), model_input.get_shape(), 2, -1, 256);
|
||||
// To avoid big relative errors in the vicinity of zero, only positive values are generated for bf16 precision
|
||||
int start_from = model_input.get_element_type() == ov::element::bf16 ? 0 : -1;
|
||||
tensor = ov::test::utils::create_and_fill_tensor(model_input.get_element_type(), model_input.get_shape(), 2, start_from, 256);
|
||||
inputs.insert({model_input.get_node_shared_ptr(), tensor});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user