-
Notifications
You must be signed in to change notification settings - Fork 797
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedWe don't have ability to look into this at the moment, but contributions are welcomeWe don't have ability to look into this at the moment, but contributions are welcome
Description
I understand that MacOS is not a priority and that supporting Apple OpenCL is impossible due to lack of SPIR-V. However, it seems that the current testing for OpenCL support is inadequate, as it doesn't determine if the OpenCL CMake finds is sufficient.
I'd like to use POCL for OpenCL CPU support on MacOS, which shouldn't be any different than POCL on Linux. What are the CMake variables to tell the build system to look for POCL instead? I've made many attempts at this but nothing documented on the internet is working.
jrhammon-mac02:build jrhammon$ make VERBOSE=1 sycl-toolchain
/usr/local/Cellar/cmake/3.14.4/bin/cmake -S/Users/jrhammon/Work/OpenCL/ISYCL/llvm/llvm -B/Users/jrhammon/Work/OpenCL/ISYCL/build --check-build-system CMakeFiles/Makefile.cmake 0
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 sycl-toolchain
/usr/local/Cellar/cmake/3.14.4/bin/cmake -S/Users/jrhammon/Work/OpenCL/ISYCL/llvm/llvm -B/Users/jrhammon/Work/OpenCL/ISYCL/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.14.4/bin/cmake -E cmake_progress_start /Users/jrhammon/Work/OpenCL/ISYCL/build/CMakeFiles 56
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 tools/sycl/CMakeFiles/sycl-toolchain.dir/all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f tools/sycl/CMakeFiles/ocl-icd.dir/build.make tools/sycl/CMakeFiles/ocl-icd.dir/depend
cd /Users/jrhammon/Work/OpenCL/ISYCL/build && /usr/local/Cellar/cmake/3.14.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/jrhammon/Work/OpenCL/ISYCL/llvm/llvm /Users/jrhammon/Work/OpenCL/ISYCL/llvm/sycl /Users/jrhammon/Work/OpenCL/ISYCL/build /Users/jrhammon/Work/OpenCL/ISYCL/build/tools/sycl /Users/jrhammon/Work/OpenCL/ISYCL/build/tools/sycl/CMakeFiles/ocl-icd.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f tools/sycl/CMakeFiles/ocl-icd.dir/build.make tools/sycl/CMakeFiles/ocl-icd.dir/build
[ 0%] Copying OpenCL ICD Loader ...
[ 0%] Built target ocl-icd
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f tools/sycl/CMakeFiles/ocl-headers.dir/build.make tools/sycl/CMakeFiles/ocl-headers.dir/depend
cd /Users/jrhammon/Work/OpenCL/ISYCL/build && /usr/local/Cellar/cmake/3.14.4/bin/cmake -E cmake_depends "Unix Makefiles" /Users/jrhammon/Work/OpenCL/ISYCL/llvm/llvm /Users/jrhammon/Work/OpenCL/ISYCL/llvm/sycl /Users/jrhammon/Work/OpenCL/ISYCL/build /Users/jrhammon/Work/OpenCL/ISYCL/build/tools/sycl /Users/jrhammon/Work/OpenCL/ISYCL/build/tools/sycl/CMakeFiles/ocl-headers.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f tools/sycl/CMakeFiles/ocl-headers.dir/build.make tools/sycl/CMakeFiles/ocl-headers.dir/build
[ 0%] Copying OpenCL headers ...
cd /Users/jrhammon/Work/OpenCL/ISYCL/build/tools/sycl && /usr/local/Cellar/cmake/3.14.4/bin/cmake -E copy_directory /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenCL.framework/CL /Users/jrhammon/Work/OpenCL/ISYCL/build/./lib/clang/9.0.0/include/CL
Error copying directory from "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenCL.framework/CL" to "/Users/jrhammon/Work/OpenCL/ISYCL/build/./lib/clang/9.0.0/include/CL".
make[3]: *** [tools/sycl/CMakeFiles/ocl-headers] Error 1
make[2]: *** [tools/sycl/CMakeFiles/ocl-headers.dir/all] Error 2
make[1]: *** [tools/sycl/CMakeFiles/sycl-toolchain.dir/rule] Error 2
make: *** [sycl-toolchain] Error 2
Steps to reproduce
#!/bin/bash
export SYCL_HOME=$HOME/Work/OpenCL/ISYCL/llvm
mkdir -p $SYCL_HOME
cd $SYCL_HOME && \
time git pull || \
time git clone https://github.com/intel/llvm.git $SYCL_HOME
rm -rf $SYCL_HOME/../build
mkdir -p $SYCL_HOME/../build && \
cd $SYCL_HOME/../build && \
time cmake \
-DCMAKE_INSTALL_PREFIX=/opt/isycl \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang;llvm-spirv;sycl" \
-DLLVM_EXTERNAL_PROJECTS="llvm-spirv;sycl" \
-DLLVM_EXTERNAL_SYCL_SOURCE_DIR=$SYCL_HOME/sycl \
-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=$SYCL_HOME/llvm-spirv \
-DLLVM_TOOL_SYCL_BUILD=ON \
-DLLVM_TOOL_LLVM_SPIRV_BUILD=ON \
$SYCL_HOME/llvm
time make -j4 sycl-toolchain
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedWe don't have ability to look into this at the moment, but contributions are welcomeWe don't have ability to look into this at the moment, but contributions are welcome