mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-19 16:04:44 +00:00
Add failing test for ftz
This commit is contained in:
parent
df5a96d935
commit
a6e6454d8b
2 changed files with 29 additions and 0 deletions
24
ptx/src/test/spirv_run/add_ftz.ptx
Normal file
24
ptx/src/test/spirv_run/add_ftz.ptx
Normal file
|
@ -0,0 +1,24 @@
|
|||
.version 6.5
|
||||
.target sm_30
|
||||
.address_size 64
|
||||
|
||||
.visible .entry add_ftz(
|
||||
.param .u64 input,
|
||||
.param .u64 output
|
||||
)
|
||||
{
|
||||
.reg .u64 in_addr;
|
||||
.reg .u64 out_addr;
|
||||
.reg .f32 temp<4>;
|
||||
|
||||
ld.param.u64 in_addr, [input];
|
||||
ld.param.u64 out_addr, [output];
|
||||
|
||||
ld.f32 temp0, [in_addr];
|
||||
ld.f32 temp1, [in_addr+4];
|
||||
add.ftz.f32 temp2, temp0, temp1;
|
||||
add.f32 temp3, temp0, temp1;
|
||||
st.f32 [out_addr], temp2;
|
||||
st.f32 [out_addr+4], temp3;
|
||||
ret;
|
||||
}
|
|
@ -180,6 +180,11 @@ test_ptx!(activemask, [0u32], [1u32]);
|
|||
test_ptx!(membar, [152731u32], [152731u32]);
|
||||
test_ptx!(shared_unify_extern, [7681u64, 7682u64], [15363u64]);
|
||||
test_ptx!(shared_unify_local, [16752u64, 714u64], [17466u64]);
|
||||
test_ptx!(
|
||||
add_ftz,
|
||||
[f32::from_bits(0x800000), f32::from_bits(0x007FFFFF)],
|
||||
[0x800000u32, 0xFFFFFF]
|
||||
);
|
||||
|
||||
test_ptx!(assertfail);
|
||||
test_ptx!(func_ptr);
|
||||
|
|
Loading…
Add table
Reference in a new issue