When compiling with the VS2017 integration, adding the -sycl-target ptx64 option to
main.cpp ->Properties->Configuration Properties -> ComputeCpp SYCL Cpp->Device->Additional Options: -sycl-target ptx64
and running code on nVIDIA I get this error:
error : Binary format for key=‘0’, ident=’’ is not recognized
This is caused by the -emit-llvm options being passed to Computecpp. (Thanks to morris hafner for spotting this)
I’ve track this down to:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\ComputeCpp.props
and
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\ComputeCpp.props
Where on line 106 () that -emit-llvm option can be removed.
Note: it looks like this problem is specific to the (so far unsupported) scenario of producing PTX code for nVIDIA on visual studio.