You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cd build && rm -rf ./*&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/ljl/Apps/OpenSYCL -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DWITH_CPU_BACKEND=ON -DWITH_CUDA_BACKEND=ON -DWITH_CUDA_NVCXX_ONLY=OFF -DWITH_ROCM_BACKEND=OFF -DWITH_OPENCL_BACKEND=OFF .. && make -j8 install
Build OpenSYCL with ROCm support
compile for AMD rocm-5.4.1(clang15): compiling and test successfully
$ export CC=clang # clang of .../rocm/llvm/bin or add -DCMAKE_C_COMPILER=clang
$ export CXX=clang++ # clang++ of .../rocm/llvm/bin or add -DCMAKE_CXX_COMPILER=clang++
$ cd build && rm -rf ./*&& cmake -DCMAKE_INSTALL_PREFIX=/home/ljl/Apps/OpenSYCL -DROCM_PATH=/opt/rocm -DWITH_ROCM_BACKEND=ON -DWITH_CUDA_BACKEND=OFF -DHIPSYCL_NO_DEVICE_MANGLER=ON -DWITH_ACCELERATED_CPU=OFF -DWITH_SSCP_COMPILER=OFF .. && make -j8 install
compile for KS-supercomputer center dtk-23.04: compiling and test successfully
$ export CC=clang # clang of .../rocm/llvm/bin or add -DCMAKE_C_COMPILER=clang
$ export CXX=clang++ # clang++ of .../rocm/llvm/bin or add -DCMAKE_CXX_COMPILER=clang++
$ cd build && rm -rf ./*&& cmake -DCMAKE_INSTALL_PREFIX=/public/home/ljlnwpu/OpenSYCL/AdaptiveCpp -DROCM_PATH=/public/software/compiler/rocm/dtk-23.04 -DBOOST_ROOT=/public/home/ljlnwpu/OpenSYCL/boost -DWITH_CPU_BACKEND=ON -DWITH_ROCM_BACKEND=ON -DWITH_CUDA_BACKEND=OFF -DHIPSYCL_NO_DEVICE_MANGLER=ON -DWITH_ACCELERATED_CPU=OFF -DWITH_SSCP_COMPILER=OFF .. && make -j8 install
add cmake option -DWITH_SSCP_COMPILER=OFF for preventing "/usr/bin/ld: can't find -lLLVM"
capture a compile bug of OpenSYCL because aligned_alloc() is pulled into std namespace after C++17:(this is for OMP)
OpenSYCL-build/src/runtime/omp/omp_allocator.cpp:57:10: error: no member named 'aligned_alloc'in namespace 'std'; did you mean simply 'aligned_alloc'?
mv "return std::aligned_alloc(min_alignment, size_bytes);" ->"return aligned_alloc(min_alignment, size_bytes)"
need higher version glib: link higher version glib from gnu/9.3.0 module file path to OpenSYCL path
$ ls -l ./OpenSYCL/lib/libstdc++.so
./OpenSYCL/lib/libstdc++.so -> /public/software/compiler/gcc-9.3.0/lib64/libstdc++.so
compile for suma dtk-23.04(clang15), dtk-22.10(clang14) compiling failed: need higher version compiler and suitable cxx lib
$ export CC=clang # clang of .../rocm/llvm/bin or add -DCMAKE_C_COMPILER=clang
$ export CXX=clang++ # clang++ of .../rocm/llvm/bin or add -DCMAKE_CXX_COMPILER=clang++
$ cd build && rm -rf ./*&& cmake -DCMAKE_INSTALL_PREFIX=/home/ljl/Apps/OpenSYCL -DROCM_PATH=/opt/rocm -DWITH_ROCM_BACKEND=ON -DWITH_CUDA_BACKEND=OFF -DHIPSYCL_NO_DEVICE_MANGLER=ON -DWITH_ACCELERATED_CPU=OFF -DWITH_SSCP_COMPILER=OFF .. && make -j8 install
without cmake option -DWITH_ACCELERATED_CPU=OFF compile pass, running std::bad_alloc(), seems related to bad g++