Skip to content

Commit 52794db

Browse files
authored
Merge pull request #2112 from chihminchao/fix_bf16_conversion_to_ocp
Fix bf16 conversion to ocp
2 parents 3bdb768 + 81df515 commit 52794db

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

softfloat/bf16_to_e4m3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4141
#include "specialize.h"
4242
#include "softfloat.h"
4343

44-
e4m3_t bf16_to_e4m3( float16_t a, bool saturationMode )
44+
e4m3_t bf16_to_e4m3( bfloat16_t a, bool saturationMode )
4545
{
4646
return f32_to_e4m3( bf16_to_f32( a ), saturationMode );
4747
}

softfloat/bf16_to_e5m2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4141
#include "specialize.h"
4242
#include "softfloat.h"
4343

44-
e5m2_t bf16_to_e5m2( float16_t a, bool saturationMode )
44+
e5m2_t bf16_to_e5m2( bfloat16_t a, bool saturationMode )
4545
{
4646
return f32_to_e5m2( bf16_to_f32( a ), saturationMode );
4747
}

softfloat/softfloat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ uint_fast8_t bf16_to_ui8( bfloat16_t, uint_fast8_t, bool );
198198
uint_fast32_t bf16_to_ui32( bfloat16_t, uint_fast8_t, bool );
199199
int_fast8_t bf16_to_i8( bfloat16_t, uint_fast8_t, bool );
200200
int_fast32_t bf16_to_i32( bfloat16_t, uint_fast8_t, bool );
201-
e4m3_t bf16_to_e4m3( float16_t, bool );
202-
e5m2_t bf16_to_e5m2( float16_t, bool );
201+
e4m3_t bf16_to_e4m3( bfloat16_t, bool );
202+
e5m2_t bf16_to_e5m2( bfloat16_t, bool );
203203
float32_t bf16_to_f32( bfloat16_t );
204204
float64_t bf16_to_f64( bfloat16_t );
205205
bfloat16_t bf16_add( bfloat16_t, bfloat16_t );

softfloat/softfloat.mk.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ softfloat_c_srcs = \
1414
bf16_cmp.c \
1515
bf16_classify.c \
1616
bf16_to_e4m3.c \
17-
bf16_to_e5m2.c \
17+
bf16_to_e5m2.c \
1818
bf16_to_f32.c \
1919
bf16_to_f64.c \
2020
bf16_to_i8.c \

0 commit comments

Comments
 (0)