<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>On Fri, 2019-03-22 at 13:23 -0500, Jason Ekstrand wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019 at 1:13 PM Iago Toral <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div>On Fri, 2019-03-22 at 12:47 -0500, Jason Ekstrand wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019 at 11:53 AM Iago Toral <<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">Yes, I think those should be fine to land now, they are very few<br>
actually. Jason, any objections?<br></blockquote><div><br></div><div>None at all.  Also, where are we at with the last few patches?</div></div></div></blockquote><div><br></div><div>Juan has just sent a new version of the series with some changes addressing review feedback from Curro, specifically addressing his feedbakc on how we validate conversions involving half-float after he clarified some if the open questions with the simulator, so we need to see if  he  is happy with that or we need to do some more iteration. The other patch that needs review is the one about validating mixed-float restrictions. That one might be tricky because we don't really emit mixed-float instructions (other than conversion between F and HF) so we don't have any empirical tesitng and some of the restrictions are open to interpretation, so I figure it might take a bit of iteration to land that and we might need to have someone from Intel do some digging with the simulator.</div></div><br></blockquote><div><br></div><div>Can we leave validating the general case as a TODO and just validate what we need for conversions?</div></div></div></blockquote><div><br></div><div>Yeah, I think that is probably acceptable. Curro, what do you think?</div><div><br></div><div>Iago</div><div><br></div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>--Jason<br></div><div> </div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div style="text-align:left;direction:ltr"><div><div>Iago</div></div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>--Jason</div><div><br></div><div> </div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
Iago<br>
<br>
On Fri, 2019-03-22 at 17:26 +0100, Samuel Pitoiset wrote:<br>
> Can you eventually merge all NIR patches now? We should be able to<br>
> hook <br>
> up that extension for RADV quite soon.<br>
> <br>
> On 2/12/19 12:55 PM, Iago Toral Quiroga wrote:<br>
> > The changes in this version address review feedback to v3. The most<br>
> > significant<br>
> > changes include:<br>
> > <br>
> > 1. A more generic constant combining pass that can handle more<br>
> > constant types (not just F and HF) requested by Jason.<br>
> > <br>
> > 2. The addition of assembly validation for half-float restrictions,<br>
> > and also<br>
> > for mixed float mode, requested by Curro. It should be noted that<br>
> > this<br>
> > implementation of VK_KHR_shader_float16_int8 does not emit any<br>
> > mixed mode float<br>
> > instructions at this moment so I have not empirically validated the<br>
> > restictions<br>
> > implemented here.<br>
> > <br>
> > As always, a branch with these patches is available for testing in<br>
> > the<br>
> > itoral/VK_KHR_shader_float16_int8 branch of the Igalia Mesa<br>
> > repository at<br>
> > <a href="https://github.com/Igalia/mesa" rel="noreferrer" target="_blank">https://github.com/Igalia/mesa</a>.<br>
> > <br>
> > Iago Toral Quiroga (40):<br>
> >    compiler/nir: add an is_conversion field to nir_op_info<br>
> >    intel/compiler: add a NIR pass to lower conversions<br>
> >    intel/compiler: split float to 64-bit opcodes from int to 64-bit<br>
> >    intel/compiler: handle b2i/b2f with other integer conversion<br>
> > opcodes<br>
> >    intel/compiler: assert restrictions on conversions to half-float<br>
> >    intel/compiler: lower some 16-bit float operations to 32-bit<br>
> >    intel/compiler: handle extended math restrictions for half-float<br>
> >    intel/compiler: implement 16-bit fsign<br>
> >    intel/compiler: drop unnecessary temporary from 32-bit fsign<br>
> >      implementation<br>
> >    compiler/nir: add lowering option for 16-bit fmod<br>
> >    compiler/nir: add lowering for 16-bit flrp<br>
> >    compiler/nir: add lowering for 16-bit ldexp<br>
> >    intel/compiler: add instruction setters for Src1Type and<br>
> > Src2Type.<br>
> >    intel/compiler: add new half-float register type for 3-src<br>
> >      instructions<br>
> >    intel/compiler: don't compact 3-src instructions with Src1Type<br>
> > or<br>
> >      Src2Type bits<br>
> >    intel/compiler: allow half-float on 3-source instructions since<br>
> > gen8<br>
> >    intel/compiler: set correct precision fields for 3-source float<br>
> >      instructions<br>
> >    intel/compiler: fix ddx and ddy for 16-bit float<br>
> >    intel/compiler: fix ddy for half-float in Broadwell<br>
> >    intel/compiler: workaround for SIMD8 half-float MAD in gen8<br>
> >    intel/compiler: split is_partial_write() into two variants<br>
> >    intel/compiler: activate 16-bit bit-size lowerings also for 8-<br>
> > bit<br>
> >    intel/compiler: rework conversion opcodes<br>
> >    intel/compiler: implement isign for int8<br>
> >    intel/compiler: ask for an integer type if requesting an 8-bit<br>
> > type<br>
> >    intel/eu: force stride of 2 on NULL register for Byte<br>
> > instructions<br>
> >    intel/compiler: generalize the combine constants pass<br>
> >    intel/compiler: implement is_zero, is_one, is_negative_one for<br>
> >      8-bit/16-bit<br>
> >    intel/compiler: add a brw_reg_type_is_integer helper<br>
> >    intel/compiler: fix cmod propagation for non 32-bit types<br>
> >    intel/compiler: remove inexact algebraic optimizations from the<br>
> >      backend<br>
> >    intel/compiler: skip MAD algebraic optimization for half-float<br>
> > or<br>
> >      mixed mode<br>
> >    intel/compiler: also set F execution type for mixed float mode<br>
> > in BDW<br>
> >    intel/compiler: validate region restrictions for half-float<br>
> >      conversions<br>
> >    intel/compiler: validate conversions between 64-bit and 8-bit<br>
> > types<br>
> >    intel/compiler: skip validating restrictions on operand types<br>
> > for<br>
> >      mixed float<br>
> >    intel/compiler: validate region restrictions for mixed float<br>
> > mode<br>
> >    compiler/spirv: move the check for Int8 capability<br>
> >    anv/pipeline: support Float16 and Int8 SPIR-V capabilities in<br>
> > gen8+<br>
> >    anv/device: expose VK_KHR_shader_float16_int8 in gen8+<br>
> > <br>
> >   src/compiler/nir/nir.h                        |   5 +<br>
> >   src/compiler/nir/nir_opcodes.py               |  73 +-<br>
> >   src/compiler/nir/nir_opcodes_c.py             |   1 +<br>
> >   src/compiler/nir/nir_opt_algebraic.py         |  11 +-<br>
> >   src/compiler/shader_info.h                    |   1 +<br>
> >   src/compiler/spirv/spirv_to_nir.c             |  11 +-<br>
> >   src/intel/Makefile.sources                    |   1 +<br>
> >   src/intel/compiler/brw_compiler.c             |   2 +<br>
> >   src/intel/compiler/brw_eu_compact.c           |   5 +-<br>
> >   src/intel/compiler/brw_eu_emit.c              |  36 +-<br>
> >   src/intel/compiler/brw_eu_validate.c          | 396 ++++++++-<br>
> >   src/intel/compiler/brw_fs.cpp                 | 101 ++-<br>
> >   .../compiler/brw_fs_cmod_propagation.cpp      |  34 +-<br>
> >   .../compiler/brw_fs_combine_constants.cpp     | 202 ++++-<br>
> >   .../compiler/brw_fs_copy_propagation.cpp      |   8 +-<br>
> >   src/intel/compiler/brw_fs_cse.cpp             |   3 +-<br>
> >   .../compiler/brw_fs_dead_code_eliminate.cpp   |   2 +-<br>
> >   src/intel/compiler/brw_fs_generator.cpp       |  54 +-<br>
> >   src/intel/compiler/brw_fs_live_variables.cpp  |   2 +-<br>
> >   src/intel/compiler/brw_fs_lower_regioning.cpp |  39 +-<br>
> >   src/intel/compiler/brw_fs_nir.cpp             |  87 +-<br>
> >   src/intel/compiler/brw_fs_reg_allocate.cpp    |   2 +-<br>
> >   .../compiler/brw_fs_register_coalesce.cpp     |   2 +-<br>
> >   .../compiler/brw_fs_saturate_propagation.cpp  |   7 +-<br>
> >   src/intel/compiler/brw_fs_sel_peephole.cpp    |   4 +-<br>
> >   src/intel/compiler/brw_inst.h                 |   2 +<br>
> >   src/intel/compiler/brw_ir_fs.h                |   3 +-<br>
> >   src/intel/compiler/brw_nir.c                  |  22 +-<br>
> >   src/intel/compiler/brw_nir.h                  |   2 +<br>
> >   .../compiler/brw_nir_lower_conversions.c      | 158 ++++<br>
> >   src/intel/compiler/brw_reg_type.c             |   4 +<br>
> >   src/intel/compiler/brw_reg_type.h             |  18 +<br>
> >   src/intel/compiler/brw_shader.cpp             |  26 +<br>
> >   src/intel/compiler/meson.build                |   1 +<br>
> >   src/intel/compiler/test_eu_validate.cpp       | 786<br>
> > ++++++++++++++++++<br>
> >   src/intel/vulkan/anv_device.c                 |   9 +<br>
> >   src/intel/vulkan/anv_extensions.py            |   1 +<br>
> >   src/intel/vulkan/anv_pipeline.c               |   2 +<br>
> >   38 files changed, 1907 insertions(+), 216 deletions(-)<br>
> >   create mode 100644 src/intel/compiler/brw_nir_lower_conversions.c<br>
> > <br>
> <br>
> <br>
<br>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></body></html>