CHIP-SPV / chipStar

chipStar is a tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs.
Other
184 stars 29 forks source link

Link __ballot() implementation at runtime #729

Closed linehill closed 8 months ago

linehill commented 9 months ago

Both the level zero and the OpenCL implementations may support SPIR-V counterpart of __ballot() below SPIR-V v1.3 with appropriate extension.

However, there does not seem to be a way to produce SPIR-V with ballot instructions on version v1.2 and below without using chipStar's fork of the llvm-spirv. To get around this limitation the ballot() is put into separate source, compiled to SPIR-V v1.3 and linked at runtime if the device supports it. Consequently, this patch should make the llvm-spirv fork unneeded.

pjaaskel commented 9 months ago

This PR could update the README.md and the LLVM installer to not advise to get the LLVM-SPIRV fork which is made unnecessary with this patch.