Closed stef closed 2 years ago
Can you provide information about opencl-clang and spirv-llvm-translator revisions you are using? How did you build them, as a separate components, or as projects in llvm tree? Have you built IGC using llvm/clang sources, or did you use alpine binaries? What parameters have you added to cmake during opencl-clang, spirv-llvm-translator, igc build?
sure. sorry for not providing that info earlier! here it goes: clang and llvm are from the distro, both version 9.0.1
opencl-clang version is 9.0.0, cmake parameters like this:
LLVM_CONFIG=/usr/lib/llvm9/bin/llvm-config \
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr ..
SPIRV-LLVM-Translator is v 9.0.0-1, cmake was called like this:
CXXFLAGS='-fPIC' CFLAGS='-fPIC' \
LLVM_CONFIG=/usr/lib/llvm9/bin/llvm-config \
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr ..
igc v1.0.3390 has been cmaked like this:
LLVM_CONFIG=/usr/lib/llvm9/bin/llvm-config \
CXXFLAGS=-Wno-alloca-larger-than \
cmake \
-Wno-dev \
-DIGC_PREFERRED_LLVM_VERSION=9.0.1 \
-DIGC_OPTION__ARCHITECTURE_TARGET=Linux64 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
..
everything has been built seperately, out-of-tree. since i intend to package all of this for alpine, and then i would like to avoid to have redundant llvm or clang packages just for opencl. for your convenience i pushed my WIP buildscripts: https://github.com/aports-ugly/aports/commit/7b538c402c4f021ce9478a4dfef1aab2d5362600
oops i also pushed some unrelated packages, looking at the respective directories might be easier to look at, than the diffs:
As I can see in https://github.com/aports-ugly/aports/blob/7b538c402c4f021ce9478a4dfef1aab2d5362600/ugly/compute-runtime/musl-compat.patch you defined
#define RTLD_DEEPBIND 0
but it's defined as
#define RTLD_DEEPBIND 0x00008 /* Use deep binding. */
in glibc-headers. Is this flag supported in musl? You can set SANITIZER_BUILD to not use RTLD_DEEPBIND flag.
no, musl does not support deepbinding. is it ok to set SANITIZER_BUILD globally via CXXFLAGS or should i only set it for the affected linux_os directory? i have a build running with a global SANITIZER_BUILD flag set, we'll see how that goes.
thank you very much for your support and prompt responses!
You can set SANITIZER_BUILD using CXXFLAGS globally. I'll prepare setup with alpine to reproduce issue using your build scripts.
btw the "makedepends" variable in the buildscripts might be a bit underpopulated, i've not resolved those yet, i'm doing this on my fully installed system, on a pristine system there will probably a bunch of makedepends missing, sorry for that but this is very much work in progress.
this seems to be closely related to #265, we might want to merge the two issues.
Closing as duplicate
when i try to build this fine project for alpine linux i get the following errors:
the 1st error seems to be that NULL should be defined, grepping through the sources i found it defined in compute-runtime-20.08.15750/runtime/scheduler/scheduler.cl - at least i could not find it anywhere else (apart from the usual stddef.h, which is not included here). why is NULL not defined here?
the next error that seems to be disabled is
cl_intel_device_side_avc_motion_estimation
, which seems to be coming fromintel-graphics-compiler-igc-1.0.3390/IGC/BiFModule/Languages/OpenCL/PreRelease/opencl_cth_pre_release.h
and indeed insrc/intel-graphics-compiler-igc-1.0.3390/build/IGC/BiFModule/CMakeFiles/BiFModuleOcl.dir/build.make
it seems that-Dcl_intel_device_side_avc_motion_estimation
is provided when doing:this extension is also enabled in src/intel-graphics-compiler-igc-1.0.3390/build/IGC/Release/bif/opencl_cth.h:6962
i'm a bit confused why this extension is not enabled.
thhe last error seems to be related, in src/intel-graphics-compiler-igc-1.0.3390/build/IGC/Release/bif/opencl_cth.h:6754 the following code is to be found:
which definces the missing symbol, again it seems the motion estimation extension is not enabled or rather in this case the symbol is not defined that i suppose should be if the extension would be enabled.
a simple bruteforce solution is to simply add these at the beginning of vme_kernels.cl
i'm sure there is a much cleaner solution to this though.