<div dir="ltr"><div dir="ltr">On Tue, 2 Mar 2021 at 11:07, Trifunovic, Konrad <<a href="mailto:konrad.trifunovic@intel.com">konrad.trifunovic@intel.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I agree that developing two backends in parallel is a bit redundant. If SPIR-V LLVM backend becomes a production quality it means actually it could consume any LLVM IR (provided it does conform to some SPIR-V restrictions).<br>
By any LLVM IR input I mean: it should be irrelevant whether it is produced by a clang, MLIR to LLVM IR lowering or just some other front-end that produces LLVM IR.<br></blockquote><div><br></div><div>Excellent.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The biggest 'impedance mismatch' that I currently see is that SPV MLIR dialect is now targeted mostly at Vulkan, while LLVM SPIR-V backend targets compute. Besides instruction set, the fundamental difference is a memory model.<br>
So if we want to unify those, we should actually make SPIR-V LLVM backend able to produce Vulkan dialect of SPIR-V as well.<br></blockquote><div><br></div><div>I see. It is unfortunate that we have a shader focused backend in one side and a compute focused in another. As you say, it means we can only move the SPV MLIR lowering to LLVM once the LLVM side also supports it.</div><div><br></div><div>I'm guessing the support is not a trivial addition to compute and that it will probably take place after the current proposal is mostly done.</div><div><br></div><div>It is unfortunate, but not altogether bad. I think it would be fine for them to co-exist until the time we unify.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">So the idea of 'SPIR-V dialect' still exists, it is just now expressed at the LLVM IR level.<br></blockquote><div><br></div><div>Indeed, that's what I meant.</div><div><br></div><div>Thanks!</div><div>--renato</div></div></div>