Hello,

This seems to be related to how you built LLVM. It does indeed segfault 
reliably when pocl is built against my distribution's LLVM; OTOH it works fine 
when using my own build of LLVM. I think this comes down to CMake "build mode" 
when building LLVM; i usually use RelWithDebInfo while distribution LLVMs 
usually build in Release mode.


We could probably #ifdef this out in pocl, though it could also be a bug in 
LLVM.


Sidenote: if you're looking into LLVM's autovectorizer, in my experience it 
refuses to vectorize almost all floating-point code unless you provide it with 
options like -cl-unsafe-math (with obvious drawbacks). It might be worth a try 
though.


OTOH, most of the math functions in pocl's kernel library 
(https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/mathFunctions.html)
 have explicitly vectorized sources and will use even AVX512 if it's available. 
But i'm afraid your OpenCL sources would have to be explicitly vectorized to 
take advantage of these.


Sidenote 2: if you run into something that's obviously a bug, please file an 
issue in https://github.com/pocl/pocl/issues - the mailing list is more useful 
for discussing ideas or asking for help.



Regards,

-- mb





________________________________
From: Noah Reddell <[email protected]>
Sent: Friday, December 28, 2018 7:42:27 PM
To: Portable Computing Language development discussion
Subject: [pocl-devel] POCL_DEBUG_LLVM_PASSES=1 causes SEGFAULT

This one is 100% repeatable and independent of POCL_CACHE_DIR, POCL_DEBUG, and 
POCL_VECTORIZER_REMARKS.

export POCL_DEBUG_LLVM_PASSES=1

In first call to clBuildProgram:

  WmResidentPatchProcessor::WmResidentPatchProcessor(WmComputeProgram*, 
boost::shared_ptr<WmComputeAssignment const>, 
std::vector<boost::shared_ptr<WmSubDomain const>, 
std::allocator<boost::shared_ptr<WmSubDomain const> > > const&, 
WmComputeMachine&)@wmresidentpatchprocessor.cc:358
  [email protected]:37
  compile_and_link_program@pocl_build.c:624
  pocl_llvm_build_program@pocl_llvm_build.cc:195
  InitializeLLVM()@pocl_llvm_utils.cc:371
ATP Stack walkback for Rank 46 done
Process died with signal 11: 'Segmentation fault'
Forcing core dumps of ranks 46, 0

Any ideas to try?
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to