Skip to content
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

关于fwd-torch的几个路径的问题 #11

Closed
dgl547437235 opened this issue Apr 29, 2021 · 2 comments
Closed

关于fwd-torch的几个路径的问题 #11

dgl547437235 opened this issue Apr 29, 2021 · 2 comments

Comments

@dgl547437235
Copy link

image
你好,我在编译fwd-torch的时候,一直报找不到包的问题,如图,我想问这其中的CMAKE_PREFIX_PATH ,TORCH_DIR,TORCH_CMAKE_PATH都是关于torch的什么路径,是跟pytorch官方下的libtorch有关吗,具体是指定到其中的哪些路径

@dgl547437235
Copy link
Author

image
在部分情况下,可以cmake生成项目,但在编译阶段,出现了如上的错误,cmake选项如下图
image

@yuanzexi
Copy link
Collaborator

yuanzexi commented May 8, 2021

@dgl547437235

  1. 关于第一个问题,CMAKE 的 message 有给提示,使用 libtorch 时,需要指定到 libtorch 目录下的 share/cmake ,例如 -DCMAKE_PREFIX_PATH=path\to\libtorch\share\cmake
    image

  2. 关于第二个问题:在 Windows 平台下,由于 PyTorch 自身 Python 版本库无法支持 Libtorch 编译,目前不支持 BUILD_PYTHON_LIB for Forward-Torch,所以需要关掉 BUILD_PYTHON_LIB,从而根据上述问题一的回答使用 CMAKE_PREFIX_PATH=/path/to/libtorch/share/cmake 来指定 libtorch 目录。

这里附上 cmake-gui 使用前的 add_entry。
image

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

2 participants