Skip to content

Commit

Permalink
Added E2E case for cvt.rn.bf16.f32
Browse files Browse the repository at this point in the history
  • Loading branch information
TejaX-Alaghari committed Jan 20, 2025
1 parent 69be2a5 commit 93ad92b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion features/feature_case/asm/asm_arith.cu
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ __device__ int cvt() {
float f32;
double f64;
uint16_t f16;
uint16_t bf16;

{ asm("cvt.u16.s16 %0, %1;" : "=h"(u16) : "h"((int16_t)0x1234)); if (!(u16 == 0x1234)) { return 1; } };
{ asm("cvt.s32.s16 %0, %1;" : "=r"(s32) : "h"((int16_t)0x1234)); if (!(s32 == 0x1234)) { return 2; } };
Expand Down Expand Up @@ -688,7 +689,8 @@ __device__ int cvt() {
{ asm("cvt.rp.f64.s64 %0, %1;" : "=d"(f64) : "l"(3ll)); if (!(f64 == 3.0)) { return 65; } };
{ asm("cvt.rn.f64.u64 %0, %1;" : "=d"(f64) : "l"(3ll)); if (!(f64 == 3.0)) { return 66; } };


{ asm("cvt.rn.bf16.f32 %0, %1;" : "=h"(bf16) : "f"(3.14f)); if (!(bf16 == 0x4049)) { return 67; } };

return 0;
}

Expand Down

0 comments on commit 93ad92b

Please sign in to comment.