Bug 5769 - 基于pytorch-devel-2.0.1构建intel-extension-for-pytorch报错
Summary: 基于pytorch-devel-2.0.1构建intel-extension-for-pytorch报错
Status: RESOLVED FIXED
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: SIG Packages (show other bugs) SIG Packages
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: xuchunmei
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-07 10:55 UTC by xuchunmei
Modified: 2023-08-31 16:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xuchunmei alibaba_cloud_group 2023-07-07 10:55:05 UTC
Description of problem:

在Anolis OS 23上尝试从源码构建intel-extension-for-pytorch,构建失败。

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. 下载源码
git clone https://github.com/intel/intel-extension-for-pytorch.git
cd intel-extension-for-pytorch
git checkout v2.0.100+cpu
2.安装构建依赖
dnf install anolis-epao-release
dnf install pytorch-devel
3. 执行构建
python setup.py bdist_wheel

Actual results:
构建命令执行失败,报错信息:
running build_clib
-- Caffe2: Found gflags with new-style gflags target.
-- Caffe2: Cannot find glog automatically. Using legacy find.
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (glog) does
  not match the name of the calling package (Caffe2).  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):
  /usr/share/cmake/Caffe2/public/glog.cmake:49 (find_package_handle_standard_args)
  /usr/share/cmake/Caffe2/Caffe2Config.cmake:33 (include)
  /usr/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  CMakeLists.txt:20 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Caffe2: Found glog (include: /usr/include, library: /usr/lib64/libglog.so)
-- Caffe2: Found protobuf with new-style protobuf targets.
-- Caffe2: Protobuf version 3.19.6
CMake Error at /usr/share/cmake/Caffe2/Caffe2Config.cmake:110 (include):
  include could not find requested file:

    /usr/share/cmake/Caffe2/Caffe2Targets.cmake
Call Stack (most recent call first):
  /usr/share/cmake/Torch/TorchConfig.cmake:68 (find_package)
  CMakeLists.txt:20 (find_package)


CMake Warning at /usr/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /usr/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:20 (find_package)


CMake Error at /usr/share/cmake/Torch/TorchConfig.cmake:182 (set_target_properties):
  set_target_properties Can not find target to add properties to: torch
Call Stack (most recent call first):
  CMakeLists.txt:20 (find_package)


CMake Error at /usr/share/cmake/Torch/TorchConfig.cmake:187 (set_property):
  set_property could not find TARGET torch.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  CMakeLists.txt:20 (find_package)




Expected results:
构建成功

Additional info:
Comment 1 xuchunmei alibaba_cloud_group 2023-08-31 16:16:54 UTC
pytorch构建方式已优化,intel-extension-for-pytorch已经能够正常构建。
https://gitee.com/src-anolis-ai/intel-extension-for-pytorch/pulls/1