<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><span style="color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">RISC-V has a draft extension for half-precision proposed last year[1],</span><br></div><div><p style="margin:0px 0px 12px;padding:0px;border:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">so we think adding a new type for that would be great to make this<br>easier to use that extension.</p><p style="margin:0px 0px 12px;padding:0px;border:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">We found there is <tt style="background:rgba(71,87,120,0.1);padding:1px 4px;border-radius:3px;white-space:pre-wrap;line-break:anywhere;margin-top:0px">_Float16</tt> and <tt style="background:rgba(71,87,120,0.1);padding:1px 4px;border-radius:3px;white-space:pre-wrap;line-break:anywhere">__fp16</tt> types are supported on GCC and<br>Clang, but <tt style="background:rgba(71,87,120,0.1);padding:1px 4px;border-radius:3px;white-space:pre-wrap;line-break:anywhere">_Float16</tt> has C++ supporting issues on GCC site, so we think<br>support both types is a reasonable choice to us.</p><p style="margin:0px 0px 12px;padding:0px;border:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">However we would like have slight different behavior for <tt style="background:rgba(71,87,120,0.1);padding:1px 4px;border-radius:3px;white-space:pre-wrap;line-break:anywhere;margin-top:0px">__fp16</tt> other<br>than ACLE: The evaluation format of <tt style="background:rgba(71,87,120,0.1);padding:1px 4px;border-radius:3px;white-space:pre-wrap;line-break:anywhere">__fp16</tt> set same as <tt style="background:rgba(71,87,120,0.1);padding:1px 4px;border-radius:3px;white-space:pre-wrap;line-break:anywhere">_Float16</tt>,<br>which means no promotion are performed if there is no hardware half-precision<br>supported.</p><p style="margin:0px 0px 12px;padding:0px;border:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">The only concern to us is it's defined differnt with clang's document,<br style="margin-top:0px">so we would put this RFC patch here, to make sure it's OK for make<br><tt style="background:rgba(71,87,120,0.1);padding:1px 4px;border-radius:3px;white-space:pre-wrap;line-break:anywhere">__fp16</tt> has differnt behavior between differnt targets.</p><p style="margin:0px 0px 12px;padding:0px;border:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">This patch contains document change only, implementation would be in<br style="margin-top:0px">other patches.</p><p style="margin:0px 0px 12px;padding:0px;border:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">[1] <a href="https://github.com/riscv/riscv-isa-manual/pull/496" rel="noreferrer" style="text-decoration-line:none;color:rgb(19,108,178);margin-top:0px" target="_blank">https://github.com/riscv/riscv-isa-manual/pull/496</a><br>[2] <a href="https://github.com/riscv/riscv-elf-psabi-doc/pull/172" rel="noreferrer" style="text-decoration-line:none;color:rgb(19,108,178)" target="_blank">https://github.com/riscv/riscv-elf-psabi-doc/pull/172</a></p><p style="margin:0px 0px 12px;padding:0px;border:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><br></p><div>Corresponding phabricator entry for this RFC:</div><p style="margin:0px 0px 12px;padding:0px;border:0px;color:rgb(0,0,0);font-family:"Segoe UI","Segoe UI Emoji","Segoe UI Symbol",Lato,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><a href="https://reviews.llvm.org/D98012" target="_blank">https://reviews.llvm.org/D98012</a><br></p><div></div></div></div>
</div></div>