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

SPIR-V portability fix for single element vectors #719

Closed linehill closed 9 months ago

linehill commented 9 months ago

Adjust a HIP header for avoiding single element vectors to appear in LLVM IR. Single element vectors are not supported in SPIR-V without an extension (e.g. SPV_INTEL_vector_compute) which are enabled with hard coded --spirv-ext=+all option in clang.

I'll make clang patch to disable all SPIR-V extension which will cause an assertion to be triggered in llvm-spirv if there are single element vectors in the input device code.

Related to issue #713.

(We had this patch previously but it got lost in #521)

pjaaskel commented 9 months ago

Let's add also to 1.1.

pvelesko commented 9 months ago

rebased on main