File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
sycl/include/sycl/ext/oneapi/matrix Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -604,7 +604,9 @@ joint_matrix_mad(
604
604
#endif // defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)
605
605
}
606
606
607
- float float_to_tf32 (float a) {
607
+ // This function rounds the bottom 13 bits up or down, and then zeros out the
608
+ // bottom bits
609
+ float round_to_tf32 (float a) {
608
610
#if defined(__SYCL_DEVICE_ONLY__) && defined(__NVPTX__)
609
611
int32_t tmp_int = __nvvm_f2tf32_rna (a);
610
612
return __nvvm_bitcast_i2f (tmp_int);
@@ -618,7 +620,7 @@ float float_to_tf32(float a) {
618
620
}
619
621
620
622
// This function just zeros out the bottom 13 bits of the tf32 type
621
- float tf32_to_float (float a) {
623
+ float truncate_to_tf32 (float a) {
622
624
uint32_t tmp_uint = reinterpret_cast <uint32_t &>(a);
623
625
tmp_uint &= 0xFFFFE000u ;
624
626
float ret = reinterpret_cast <float &>(tmp_uint);
You can’t perform that action at this time.
0 commit comments