Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
31 Views

VS2015 Code Builder can't use Intel extensions because of SPIR-V?

Code Builder seems to have inconsistent behavior when compiling a kernel that uses intel_xxx() extensions or an intel_xxx kernel attribute and targets a GPU (HD 530 / Skylake).

The kernel will not compile unless I add the switch "-cl-fast-relaxed-math" or a couple other options.  Not every option results in a successful compile.

The issue appears to be that the SPIR-V backend doesn't support the Intel extensions/attributes (which makes sense).

So why is Code Builder even bothering to generate SPIR-V when there is no support for _loading_ SPIR-V IL in Skylake and Intel extensions were detected?

_____________________

Failed to generate SPIR-V output file: foo.cl:9:32: warning: expected 'enable' or 'disable' - ignoring

foo.cl:267:16: warning: unknown attribute 'intel_reqd_sub_group_size' ignored

foo.cl:465:71: error: implicit declaration of function 'intel_sub_group_shuffle' is invalid in OpenCL

 

0 Kudos
3 Replies
Highlighted
31 Views

You are right.  SPIR and SPIR-V cover standard OpenCL, not the Intel-specific extensions.  It is a great suggestion to add clearer exit conditions.  

Is there any chance you could send a reproducer for the inconsistent behavior?  We may want to look at this from a specific as well as a general perspective.

 

 

0 Kudos
Highlighted
Beginner
31 Views

I don't have a reproducer handy but all you need to do is launch a kernel that loads a word per work item and shuffles it with something like intel_sub_group_shuffle_xor(<data>,7) and store it back out.  Also annotate the kernel with the "intel_reqd_sub_group_size" attribute.

That should trigger both of warnings/errors that I listed.

0 Kudos
Highlighted
31 Views

Just wanted to let you know that I've reproduced the inconsistent behavior with the subgroups extensions and -spirv32/64 with ioc64.

0 Kudos