artyom-beilis / pytorch_dlprim

DLPrimitives/OpenCL out of tree backend for pytorch
http://blog.dlprimitives.org/
MIT License
279 stars 17 forks source link

Problem with building #90

Closed vulkomilev closed 2 months ago

vulkomilev commented 2 months ago

While building I have encountered and error ` $ cmake -DCMAKE_PREFIX_PATH=/home//anaconda3/envs/pytorch_dlprim/lib/python3.8/site-packages/torch/share/cmake/Torch/ -DCMAKE_INSTALL_PREFIX=./build CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.

CMake Warning at /home//anaconda3/envs/pytorch_dlprim/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message): static library kineto_LIBRARY-NOTFOUND not found. Call Stack (most recent call first): /home//anaconda3/envs/pytorch_dlprim/lib/python3.8/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:120 (append_torchlib_if_found) CMakeLists.txt:4 (find_package)

=== Status === OpenCL: include OCL_PATH-NOTFOUND lib /usr/lib/x86_64-linux-gnu/libOpenCL.so Python: /home//anaconda3/bin/python3 BLAS: None HDF5: None Sqlite3: include /usr/include lib /usr/lib/x86_64-linux-gnu/libsqlite3.so Protobuf (onnx): disabled Python dlprim: disabled Pytorch libraries torch;torch_library;/home//anaconda3/envs/pytorch_dlprim/lib/python3.8/site-packages/torch/lib/libc10.so Python libraries /usr/local/lib/libpython3.11.a Python include /usr/local/include/python3.11 -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OCL_PATH used as include directory in directory /home//open_source/pytorch_dlprim used as include directory in directory /home//open_source/pytorch_dlprim used as include directory in directory /home//open_source/pytorch_dlprim used as include directory in directory /home//open_source/pytorch_dlprim used as include directory in directory /home//open_source/pytorch_dlprim used as include directory in directory /home//open_source/pytorch_dlprim used as include directory in directory /home//open_source/pytorch_dlprim used as include directory in directory /home//open_source/pytorch_dlprim/dlprimitives used as include directory in directory /home//open_source/pytorch_dlprim/dlprimitives used as include directory in directory /home//open_source/pytorch_dlprim/dlprimitives used as include directory in directory /home//open_source/pytorch_dlprim/dlprimitives used as include directory in directory /home//open_source/pytorch_dlprim/dlprimitives used as include directory in directory /home//open_source/pytorch_dlprim/dlprimitives used as include directory in directory /home//open_source/pytorch_dlprim/dlprimitives

CMake Error in CMakeLists.txt: Found relative path while evaluating include directories of "pt_ocl":

"OCL_PATH-NOTFOUND"

CMake Error in dlprimitives/CMakeLists.txt: Found relative path while evaluating include directories of "dlprim_core":

"OCL_PATH-NOTFOUND"

-- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. ` My system is OS: Ubuntu 22.04.4 LTS x86_64 Kernel: 6.8.0-40-generic Uptime: 4 days, 10 hours, 51 mins Packages: 4536 (dpkg), 11 (flatpak), 67 (snap) Shell: bash 5.1.16 Resolution: 3840x2160 DE: GNOME WM: Mutter WM Theme: Adwaita Theme: Yaru [GTK2/3] Icons: Yaru [GTK2/3] Terminal: gnome-terminal CPU: AMD Ryzen 9 5950X (32) @ 3.400GHz GPU: NVIDIA 0b:00.0 NVIDIA Corporation Device 2684 GPU: NVIDIA 0c:00.0 NVIDIA Corporation Device 2684 Memory: 32986MiB / 128718MiB | NVIDIA-SMI 550.78 Driver Version: 550.78 CUDA Version: 12.4

artyom-beilis commented 2 months ago

You need opencl dev files:

apt install ocl-icd-opencl-dev opencl-clhpp-headers opencl-c-headers

Note if you don't have CL/opencl.hpp - new header you may enable -DUSE_CL2_HPP=ON - but less recommended

vulkomilev commented 2 months ago

thanks it worked