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

Bad portability due to Intel extensions in generated SPIR-V binaries #713

Closed linehill closed 9 months ago

linehill commented 9 months ago

Currently HIP application compiled by chipStar don't port to non-Intel devices due to Intel extensions in SPIR-V binaries. This is known to be a problem with Mali GPU. An example from the VecAdd sample:

spirv-dis VecAdd-hip-spirv64-generic.out | grep -i intel
               OpCapability FPFastMathModeINTEL
               OpCapability MemoryAccessAliasingINTEL
               OpExtension "SPV_INTEL_memory_access_aliasing"
         %41 = OpAliasDomainDeclINTEL
         %42 = OpAliasScopeDeclINTEL %41
         %43 = OpAliasScopeListDeclINTEL %42
         %50 = OpAliasDomainDeclINTEL
         %51 = OpAliasScopeDeclINTEL %50
         %52 = OpAliasScopeListDeclINTEL %51
        %101 = OpAliasDomainDeclINTEL
        %102 = OpAliasScopeDeclINTEL %101
        %103 = OpAliasScopeListDeclINTEL %102
...