Trouble building NVPTX

55 views
Skip to first unread message

Scott Pakin

unread,
Oct 26, 2017, 4:04:39 PM10/26/17
to Intel SPMD Program Compiler Developers
I'd like to try out the nvptx target, but I can't figure out how to build ISPC with NVPTX enabled.  I pulled down the latest version of ISPC from GitHub (9d9e46b8), installed the patched LLVM using the alloy.py script, and built with NVPTX_ENABLED=1.  I always wind up with errors like the following:

Compiling opt.cpp
opt.cpp:817:27: error: no member named 'createTypeBasedAliasAnalysisPass' in
      namespace 'llvm'; did you mean 'createTypeBasedAAWrapperPass'?
          optPM.add(llvm::createTypeBasedAliasAnalysisPass());
                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          createTypeBasedAAWrapperPass
/tmp/llvm-5.0.0-ispc-patched/bin-5.0/include/llvm/Analysis/TypeBasedAliasAnalysis.h:83:16: note: 
      'createTypeBasedAAWrapperPass' declared here
ImmutablePass *createTypeBasedAAWrapperPass();
               ^
opt.cpp:818:27: error: no member named 'createBasicAliasAnalysisPass' in
      namespace 'llvm'; did you mean 'createCostModelAnalysisPass'?
          optPM.add(llvm::createBasicAliasAnalysisPass());
                    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          createCostModelAnalysisPass
/tmp/llvm-5.0.0-ispc-patched/bin-5.0/include/llvm/Analysis/Passes.h:53:17: note: 
      'createCostModelAnalysisPass' declared here
  FunctionPass *createCostModelAnalysisPass();

and a few more along those lines.  I tried
  • installing LLVM/Clang versions 3.8.1 and 5.0.0 and using those, and
  • compiling with CXX set to either clang++ (above versions) or g++ (v6.3.0)
in all four combinations.  (This is on an Ubuntu 17.04 system.)  In all cases, I added the patched LLVM/Clang's bin-x.y/bin directory to the start of my PATH, pointed ISPC_HOME to the top-level ISPC directory, and pointed LLVM_HOME to the top level of the patched LLVM/Clang directory.

Without NVPTX_ENABLED=1, ISPC builds fine, although I did have to specify -D_GLIBCXX_USE_CXX11_ABI=1 to make the linker happy.

Any idea what the problem might be?

Thanks,
— Scott

P.S.  I wasn't sure if build questions belong in the Users forum or the Developers forum.  I guessed the latter, but please let me know if I picked the wrong one.

Dmitry Babokin

unread,
Oct 26, 2017, 5:22:46 PM10/26/17
to ispc...@googlegroups.com
PTX build was not maintained for some time, so the latest version of LLVM it's known to build is 3.5.

You can also try using pre-built binary "ispc-v1.8.2ptx-linux.tar.gz" available here: https://sourceforge.net/projects/ispcmirror/files/v1.8.2/

Even though LLVM 3.5 is quite old, it should not affect performance of resulting ispc too much.

--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Pakin

unread,
Oct 29, 2017, 2:58:05 PM10/29/17
to Intel SPMD Program Compiler Developers
On Thursday, October 26, 2017 at 3:22:46 PM UTC-6, Dmitry Babokin wrote:
PTX build was not maintained for some time, so the latest version of LLVM it's known to build is 3.5.

You can also try using pre-built binary "ispc-v1.8.2ptx-linux.tar.gz" available here: https://sourceforge.net/projects/ispcmirror/files/v1.8.2/

Even though LLVM 3.5 is quite old, it should not affect performance of resulting ispc too much.

Thanks.  Downloading the pre-built binary now…

— Scott

P.S.  Kind of a bummer PTX stopped being maintained.  I like the idea of having ISPC code optimized for Xeon, Xeon Phi, and NVIDIA GPUs.
Reply all
Reply to author
Forward
0 new messages