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

Adjustments for future LLVM-18 release #714

Closed linehill closed 6 months ago

linehill commented 9 months ago

Updates are currently based on:

franz commented 9 months ago

Tested with LLVM main branch (probably not exactly same commits, built on Nov 28), chipStar & catch tests build OK, check.py tests pass with iGPU (both L0 and OCL backends).

pvelesko commented 6 months ago

@linehill no longer a draft perhaps?

linehill commented 6 months ago

I'll test with the recent revision of the LLVM-18 locally, update if needed and mark then this for review.

pvelesko commented 6 months ago

Is this using mainline LLVM and SPIRV-Translator? I didn't find new branches in our fork for LLVM18.

Using mainline seems like tests pass locally. I updated the llvm_configure.sh script and will update CI to add 18 to testing.

I had to add -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="SPIRV" option because without it I got a lot of warnings from opt about spirv64 target not being built. These warnings went away with the experimental target enabled. Expected? @linehill

linehill commented 6 months ago

Is this using mainline LLVM and SPIRV-Translator?

I have been using the upstream branches.

I had to add -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="SPIRV" option because without it I got a lot of warnings from opt about spirv64 target not being built. These warnings went away with the experimental target enabled. Expected?

I had forgot I had the option set on so I haven't seen the warnings. By glance, it seems unexpected to have warnings from opt - we shouldn't need the target (read: backend) if we are using llvm-spirv for SPIR-V emission.