0

I'm trying to build the compute cpp sdk of codeplay under Windows 10 with Visual Studio 2019 to target some NVidia card. So far I have generate the solution throw cmake precising ptx64 as the COMPUTECPP_BITCODE. My issue is that after opening the solution with VS2019 I launch the build but it "never" ended, after several hours.

Here is the build log where it kept stuck

1>------ Début de la génération : Projet : accessors, Configuration : Release x64 ------
2>------ Début de la génération : Projet : async-handler, Configuration : Release x64 ------
3>------ Début de la génération : Projet : builtin-kernel-example, Configuration : Release x64 ------
4>------ Début de la génération : Projet : custom-device-selector, Configuration : Release x64 ------
5>------ Début de la génération : Projet : example-sycl-application, Configuration : Release x64 ------
6>------ Début de la génération : Projet : gaussian-blur, Configuration : Release x64 ------
7>------ Début de la génération : Projet : images, Configuration : Release x64 ------
8>------ Début de la génération : Projet : ivka, Configuration : Release x64 ------
1>Building ComputeCpp integration header file [...]/computecpp-sdk/build/samples/accessors_accessors.cpp.sycl
3>Building ComputeCpp integration header file [...]/computecpp-sdk/build/samples/builtin-kernel-example_builtin-kernel-example.cpp.sycl
4>Building ComputeCpp integration header file [...]/computecpp-sdk/build/samples/custom-device-selector_custom-device-selector.cpp.sycl
7>Building ComputeCpp integration header file [...]/computecpp-sdk/build/samples/images_images.cpp.sycl
5>Building ComputeCpp integration header file [...]/computecpp-sdk/build/samples/example-sycl-application_example-sycl-application.cpp.sycl
6>Building ComputeCpp integration header file [...]/computecpp-sdk/build/samples/gaussian-blur_gaussian-blur.cpp.sycl
8>Building ComputeCpp integration header file [...]/computecpp-sdk/build/samples/ivka_ivka.cpp.sycl

If anyone has any idea or suggestion it would be amazing for me. If you need any additional info do not hesitate to ask.

Thanks you in advance for your help

Codebling
  • 10,764
  • 2
  • 38
  • 66
Esteban
  • 11
  • 2
  • What happens if you try to only build one of the samples? Does that work? – Rod Burns Oct 08 '19 at 13:06
  • Trying to build only "matrix-multiply" I obtain the following output and it also get stucks:`1>Building ComputeCpp integration header file D:/dev/lib/computecpp-sdk/build/samples/matrix-multiply_matrix-multiply.cpp.sycl` – Esteban Oct 09 '19 at 08:52
  • I'm not sure what to suggest since we haven't seen this before and can't reproduce it. What if you don't use the ptx flag in cmake, does it build correctly in that case? – Rod Burns Oct 09 '19 at 17:54
  • When building without ptx flag added to cmake, the build proceed to its end but I obtain 26 build failure due to `#error STL1000: Unexpected compiler version, expected Clang 8 or newer`. Adding `include(ComputeCppCompilerChecks)` in FindComputeCpp.cmake as stated in [this thread](https://support.codeplay.com/t/error-stl1000-unexpected-compiler-version-expected-clang-7-or-newer/133) still results in 3 failure due to `error LNK2019: symbole externe non résolu "__declspec(dllimport) private: class std::shared_ptr[...]` – Esteban Oct 10 '19 at 07:35

1 Answers1

1

There is an abi mis-match when using ComputeCpp with VS 2019 since ComputeCpp is on Clang 7

You can work around this by setting the toolset to v140 and then setting a flag in the compiler main.cpp ->Properties->Configuration Properties -> ComputeCpp SYCL Cpp->Device->Additional Options -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH

Rod Burns
  • 2,104
  • 13
  • 24
  • I have set the toolset of all samples to v140 but I do not have the ComputeCpp SYCL tab inside the property sheet. I thnik it's because I have VS2019 and the installer of ComputeCPP only propose integration to VS2015 and VS2017 but tell me if I'm wrong or if there is an other way to access the properties. – Esteban Oct 11 '19 at 07:14