1

SPIR-V -???-> GPU native

https://www.khronos.org/assets/uploads/developers/library/2016-vulkan-devday-uk/3-Intro-to-spir-v-shaders.pdf Mentioned it's a "IHV Compiler" but I can't figure out what that is. I presume it's a vendor (Nvidia/AMD/intel) specific compiler. Where can I find more information on SPIR-V to native (GPU) machine format compilers?

Ron
  • 73
  • 1
  • 4
  • Why does there have to be a ??? between these two? And what would you do with such information anyway? You can't control it or affect the results without vendor-specific extensions. And if such extensions exist, they'll tell you how they work. – Nicol Bolas Mar 17 '21 at 14:03
  • I've no idea what happens there. GLSL gets compiled to SPIR-V with glslangvalidator. But does SPIR-V use to get to the native gpu format? – Ron Mar 17 '21 at 14:05
  • You're missing the point of my question: what does it matter? You have some SPIR-V code, and you hand it off to an API to get a shader module/whatever that does what the SPIR-V specification says that the given SPIR-V does. Exactly how that process works is irrelevant; it's beyond your control outside of any vendor-specific extensions. – Nicol Bolas Mar 17 '21 at 14:08
  • I'm trying to fuzz gpu instructions. – Ron Mar 17 '21 at 14:13
  • Okay, I think I may have my answer, instructions get compiled by the driver at load time. AMD does provide the ISA https://gpuopen.com/documentation/amd-isa-documentation/ But Nvidia doesn't. – Ron Mar 17 '21 at 14:21
  • What does "fuzz" mean in this context? Even if you know the ISA, that doesn't mean you get to feed the GPU your code. Not unless there's a vendor extension to let you do that. – Nicol Bolas Mar 17 '21 at 14:44
  • As far as I know you can feed bytecode to AMD cards nowadays... nvidia not so much but if you're willing to do some reverse engineering you might find a way. – LJᛃ Mar 23 '21 at 11:43

0 Answers0