Skip to content

2.6xpu on ubuntu24.04lts build failed #803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
quantwin opened this issue Apr 5, 2025 · 12 comments
Open

2.6xpu on ubuntu24.04lts build failed #803

quantwin opened this issue Apr 5, 2025 · 12 comments
Assignees

Comments

@quantwin
Copy link

quantwin commented Apr 5, 2025

Describe the issue

follow this guide,

https://pytorch-extension.intel.com/installation?platform=gpu&version=v2.6.10%2Bxpu&os=linux%2Fwsl2&package=source

https://dgpu-docs.intel.com/driver/client/overview.html#installing-client-gpus-on-ubuntu-desktop-24-04-lts

run sh as below, (only ultra9 185H)

~/Downloads/ipex_bundle$ bash compile_bundle.sh /opt/intel/oneapi mtl

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.3/26.3 MB 16.4 MB/s eta 0:00:00

Collecting umf==0.10.* (from intel-cmplr-lib-ur==2025.1.0->intel-openmp<2026,>=2024->mkl-static)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/66/a4/1d289b37333a7c9a54d590d04a4d83aefa0e3d1ab1ad98e592d22080347a/umf-0.10.0-py2.py3-none-manylinux_2_28_x86_64.whl (314 kB)
Installing collected packages: tcmlib, mkl-include, umf, tbb, tbb-devel, intel-cmplr-lib-ur, intel-openmp, mkl-static
Attempting uninstall: tcmlib
Found existing installation: tcmlib 1.2.0
Uninstalling tcmlib-1.2.0:
Successfully uninstalled tcmlib-1.2.0
Attempting uninstall: umf
Found existing installation: umf 0.9.1
Uninstalling umf-0.9.1:
Successfully uninstalled umf-0.9.1
Attempting uninstall: tbb
Found existing installation: tbb 2022.1.0
Uninstalling tbb-2022.1.0:
Successfully uninstalled tbb-2022.1.0
Attempting uninstall: intel-cmplr-lib-ur
Found existing installation: intel-cmplr-lib-ur 2025.0.2
Uninstalling intel-cmplr-lib-ur-2025.0.2:
Successfully uninstalled intel-cmplr-lib-ur-2025.0.2
Attempting uninstall: intel-openmp
Found existing installation: intel-openmp 2025.0.2
Uninstalling intel-openmp-2025.0.2:
Successfully uninstalled intel-openmp-2025.0.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
dpcpp-cpp-rt 2025.0.2 requires intel-openmp==2025.0.2, but you have intel-openmp 2025.1.0 which is incompatible.
intel-sycl-rt 2025.0.2 requires intel-cmplr-lib-ur==2025.0.2, but you have intel-cmplr-lib-ur 2025.1.0 which is incompatible.
Successfully installed intel-cmplr-lib-ur-2025.1.0 intel-openmp-2025.1.0 mkl-include-2025.1.0 mkl-static-2025.1.0 tbb-2022.1.0 tbb-devel-2022.1.0 tcmlib-1.3.0 umf-0.10.0
Building wheel torch-2.6.0a0+git1eba9b3
pytorch_extra_install_requirements: intel-cmplr-lib-rt==2025.0.2|intel-cmplr-lib-ur==2025.0.2|intel-cmplr-lic-rt==2025.0.2|intel-sycl-rt==2025.0.2|tcmlib==1.2.0|umf==0.9.1|intel-pti==0.10.0
running clean
-- The CXX compiler identification is GNU 13.3.0
-- The C compiler identification is GNU 13.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- _GLIBCXX_USE_CXX11_ABI=1 is already defined as a cmake variable
-- Not forcing any particular BLAS to be found
-- Could not find ccache. Consider installing ccache to speed up compilation.
-- Performing Test C_HAS_AVX_1
-- Performing Test C_HAS_AVX_1 - Failed
-- Performing Test C_HAS_AVX_2
-- Performing Test C_HAS_AVX_2 - Success
-- Performing Test C_HAS_AVX2_1
-- Performing Test C_HAS_AVX2_1 - Failed
-- Performing Test C_HAS_AVX2_2
-- Performing Test C_HAS_AVX2_2 - Success
-- Performing Test C_HAS_AVX512_1
-- Performing Test C_HAS_AVX512_1 - Failed
-- Performing Test C_HAS_AVX512_2
-- Performing Test C_HAS_AVX512_2 - Success
-- Performing Test CXX_HAS_AVX_1
-- Performing Test CXX_HAS_AVX_1 - Failed
-- Performing Test CXX_HAS_AVX_2
-- Performing Test CXX_HAS_AVX_2 - Success
-- Performing Test CXX_HAS_AVX2_1
-- Performing Test CXX_HAS_AVX2_1 - Failed
-- Performing Test CXX_HAS_AVX2_2
-- Performing Test CXX_HAS_AVX2_2 - Success
-- Performing Test CXX_HAS_AVX512_1
-- Performing Test CXX_HAS_AVX512_1 - Failed
-- Performing Test CXX_HAS_AVX512_2
-- Performing Test CXX_HAS_AVX512_2 - Success
-- Current compiler supports avx2 extension. Will build perfkernels.
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS
-- Performing Test CAFFE2_COMPILER_SUPPORTS_AVX512_EXTENSIONS - Success
-- Current compiler supports avx512f extension. Will build fbgemm.
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_SUPPORTS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC
-- Performing Test COMPILER_SUPPORTS_RDYNAMIC - Success
-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- Performing Test CXX_HAS_SVE256
-- Performing Test CXX_HAS_SVE256 - Failed
-- No SVE processor on this machine.
-- Compiler does not support SVE extension. Will not build perfkernels.
CMake Warning (dev) at /home/eastpeace/miniconda3/envs/pytorch310/lib/python3.10/site-packages/cmake/data/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:430 (message):
The package name passed to find_package_handle_standard_args() (SYCL) does
not match the name of the calling package (SYCLToolkit). This can lead to
problems in calling code that expects find_package() result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/Modules/FindSYCLToolkit.cmake:125 (find_package_handle_standard_args)
cmake/public/xpu.cmake:12 (find_package)
cmake/Dependencies.cmake:93 (include)
CMakeLists.txt:858 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found SYCL: /opt/intel/oneapi/compiler/2025.0/include;/opt/intel/oneapi/compiler/2025.0/include/sycl (found version "20250004")
-- Building using own protobuf under third_party per request.
-- Use custom protobuf build.
CMake Error at third_party/protobuf/cmake/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.

Update the VERSION argument value. Or, use the ... syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.

Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

-- Configuring incomplete, errors occurred!
Building wheel torch-2.6.0a0+git1eba9b3
-- Building version 2.6.0a0+git1eba9b3
cmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/eastpeace/Downloads/ipex_bundle/pytorch/torch -DCMAKE_PREFIX_PATH=/home/eastpeace/miniconda3/envs/pytorch310/lib/python3.10/site-packages;/home/eastpeace/miniconda3/envs/pytorch310:/opt/intel/oneapi/pti/0.10/lib/cmake/pti:/opt/intel/oneapi/mkl/2025.0/lib/cmake:/opt/intel/oneapi/compiler/2025.0 -DGLIBCXX_USE_CXX11_ABI=1 -DPython_EXECUTABLE=/home/eastpeace/miniconda3/envs/pytorch310/bin/python -DTORCH_BUILD_VERSION=2.6.0a0+git1eba9b3 -DTORCH_XPU_ARCH_LIST=mtl -DUSE_CUDA=0 -DUSE_MPI=0 -DUSE_NUMA=0 -DUSE_NUMPY=True -DUSE_STATIC_MKL=1 /home/eastpeace/Downloads/ipex_bundle/pytorch
(pytorch310) eastpeace@mylinux:~/Downloads/ipex_bundle$ ls

@feng-intel feng-intel self-assigned this Apr 7, 2025
@feng-intel
Copy link

"CMake Error at third_party/protobuf/cmake/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake."

From the log, your cmake version is 4.0. Please install CMake < 3.5 and try again.

More info,

  1. $ clinfo -l
    to list available devices
  2. Refer this page for AOT Compilation Device Name

@quantwin
Copy link
Author

quantwin commented Apr 7, 2025

I have integrated graphics only, but with large RAM.
~$ clinfo -l
Platform #0: Intel(R) OpenCL Graphics
`-- Device #0: Intel(R) Arc(TM) Graphics

I'm too unsure if it's the cmake version that's causing the problem, because on this pc I tried the pip in win11 (24H2), and even though it eventually worked, it also prompted a version conflict with these packages, strange uninstallation issues, but when I test in jupyterlab, I can see that the video card is working, it's just that the video memory isn't being fully utilized, and is only up to 8GB (the shared video memory is more than 48G, and the physical RAM is 96G)

@quantwin
Copy link
Author

quantwin commented Apr 8, 2025

same pc but with Win11 24H2
driver_version:32.0.101.6559

(base) C:\Users-WG->activate pytorch12

(pytorch12) C:\Users-WG->python
Python 3.12.9 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:49:16) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import torch
[W408 08:58:07.000000000 OperatorEntry.cpp:161] Warning: Warning only once for all operators, other operators may also be overridden.
Overriding a previously registered kernel for the same operator and the same dispatch key
operator: aten::_validate_compressed_sparse_indices(bool is_crow, Tensor compressed_idx, Tensor plain_idx, int cdim, int dim, int nnz) -> ()
registered at C:\actions-runner_work\pytorch\pytorch\pytorch\build\aten\src\ATen\RegisterSchema.cpp:6
dispatch key: XPU
previous kernel: registered at C:\actions-runner_work\pytorch\pytorch\pytorch\build\aten\src\ATen\RegisterCPU.cpp:30477
new kernel: registered at D:\frameworks.ai.pytorch.ipex-gpu\build\Release\csrc\gpu\csrc\aten\generated\ATen\RegisterXPU.cpp:468 (function operator ())
import intel_extension_for_pytorch as ipex
torch.xpu.is_available()
True
print(ipex.version)
2.6.10+xpu
[print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())]
[0]: _XpuDeviceProperties(name='Intel(R) Arc(TM) Graphics', platform_name='Intel(R) oneAPI Unified Runtime over Level-Zero', type='gpu', driver_version='1.6.31896', total_memory=52009MB, max_compute_units=128, gpu_eu_count=128, gpu_subslice_count=16, max_work_group_size=1024, max_num_sub_groups=128, sub_group_sizes=[8 16 32], has_fp16=1, has_fp64=1, has_atomic64=1)
[None]

@feng-intel
Copy link

#803 (comment)
Please install CMake < 3.5 and build again. If there is still problem, could you give the log again?

@tye1
Copy link

tye1 commented Apr 8, 2025

CMake Error at third_party/protobuf/cmake/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.

It looks a known issue in PyTorch, which has been later resolved in pytorch/pytorch#150460 in PyTorch 2.7.

also, you don't need build torch by yourself if you just want build IPEX from source.

@jrpike
Copy link

jrpike commented Apr 17, 2025

also, you don't need build torch by yourself if you just want build IPEX from source.

How exactly am I to exclude cmake when building IPEX from source? The documentation makes no mention of this, nor are the setup scripts clear.

Regardless of any workarounds, the Intel-provided instructions here https://pytorch-extension.intel.com/installation?platform=gpu&version=v2.6.10%2Bxpu&os=linux%2Fwsl2&package=source are currently not working.

@jingxu10
Copy link
Contributor

We were not aware of the cmake version issue until cmake 4 was released recently, same as the issue reported in pytorch/pytorch#150460.
Please use pip install "cmake<4" to install cmake 3 then try again.
We will update the installation guide with the cmake version requirement.

@quantwin
Copy link
Author

(base) eastpeace@mylinux:~$ cmake --version
cmake version 3.28.3

@quantwin
Copy link
Author

I'm just an fresh AI learner. I've attempted many times and encountered similar error messages. I'll test again once the official guidelines are updated, but until then, we'll refrain from any unnecessary attempts.

@tye1
Copy link

tye1 commented Apr 21, 2025

also, you don't need build torch by yourself if you just want build IPEX from source.

How exactly am I to exclude cmake when building IPEX from source? The documentation makes no mention of this, nor are the setup scripts clear.

Regardless of any workarounds, the Intel-provided instructions here https://pytorch-extension.intel.com/installation?platform=gpu&version=v2.6.10%2Bxpu&os=linux%2Fwsl2&package=source are currently not working.

@jingxu10 please help here.

@jingxu10
Copy link
Contributor

jingxu10 commented Apr 22, 2025

Hi @quantwin , I updated the guideline.
Just wanna double check when you got the error at the beginning, was the cmake used 3.28.3?
That compilation script installs cmake with pip command, you need to check in the python environment to avoid the influence brought by cmake installed with package managers like apt.
Basically if you run pip install "cmake<4" then run the compile bundle, you should get rid of this error.

@quantwin
Copy link
Author

eastpeace@mylinux:~$ cmake --version
cmake version 3.28.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
(base) eastpeace@mylinux:~$ sudo apt install -y intel-oneapi-dpcpp-cpp-2025.0=2025.0.4-1519 intel-oneapi-mkl-devel=2025.0.1-14 intel-oneapi-ccl-devel=2021.14.0-505 intel-pti-dev=0.10.0-284
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package intel-pti-dev is a virtual package provided by:
intel-pti-dev-0.10 0.10.2-6
You should explicitly select one to install.

E: Unable to locate package intel-oneapi-mkl-devel
E: Unable to locate package intel-oneapi-ccl-devel
E: Version '0.10.0-284' for 'intel-pti-dev' was not found
(base) eastpeace@mylinux:~$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants