Commit 3665d85f authored by Geoffrey Wenger's avatar Geoffrey Wenger Committed by Scott Cyphers

Fixed bug in from_float_vector (#4180)

parent c748bda4
......@@ -55,7 +55,8 @@ std::vector<float> bfloat16::to_float_vector(const std::vector<bfloat16>& v_bf16
std::vector<bfloat16> bfloat16::from_float_vector(const std::vector<float>& v_f32)
{
std::vector<bfloat16> v_bf16(v_f32.size());
std::vector<bfloat16> v_bf16;
v_bf16.reserve(v_f32.size());
for (float a : v_f32)
{
v_bf16.push_back(static_cast<bfloat16>(a));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment