KhronosGroup / KhronosGroup/SPIRV-Tools

Support for new Intel SPIR-V exts used by new "ISPC for Gen" generated SPIR-V files

Open
#3,632 2 comments 0 reactions 0 assignees View on GitHub
component:validation
Dominant language
C++
Stars
1.4k
Forks
709
Avg merge
1d 22h
Merged PRs (30d)
28

Description

Hi,
new ISPC 1.14 supports now Intel GPUs..
see:
https://ispc.github.io/ispc_for_gen.html
(ispc foo.ispc --target=genx-x8 -o foo.spv)
It generates SPIR-V files using new Intel SPIR-V extensions which seem unsupported by spirv-dis right now..
I generate like this:
`ispc ispc-v1.14.0-gen-alpha-linux/examples/portable/genx/aobench/aobench2.ispc -o ao.spv --target=genx-x8 -I./ispc-v1.14.0-gen-alpha-linux/include/ispcrt
`
upon quick inspection on spv file I see it makes use of this SPIR-V extensions:

```
SPV_INTEL_float_controls2
SPV_INTEL_vector_compute
SPV_KHR_float_controls
SPV_KHR_no_integer_wrap_decoration
```
fail to spirv-dis:
```
spirv-dis ao.spv
; SPIR-V
; Version: 1.1
; Generator: Khronos LLVM/SPIR-V Translator; 14
; Bound: 3851
; Schema: 0
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Vector16
OpCapability Int64
OpCapability Int16
OpCapability Int8
OpCapability SubgroupDispatch
OpCapability DenormFlushToZero
OpCapability RoundingModeRTE
OpCapability RoundingModeRTZ
error: 12: Invalid capability operand: 5583

```
I attach example spv file:

[ao.zip](https://github.com/KhronosGroup/SPIRV-Tools/files/5009455/ao.zip)

Contributor guide

Open the contributing guide

Research direction

Start by running spirv-dis on the attached ao.spv and reviewing the reported invalid capability operand. Trace support for SPV_INTEL_float_controls2, SPV_INTEL_vector_compute, SPV_KHR_float_controls, and SPV_KHR_no_integer_wrap_decoration; done means the sample generated by ISPC 1.14 disassembles without unsupported-extension errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.