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

std::optional pulsar build ERROR #1795

Closed
git-xuefu opened this issue May 14, 2024 · 2 comments
Closed

std::optional pulsar build ERROR #1795

git-xuefu opened this issue May 14, 2024 · 2 comments

Comments

@git-xuefu
Copy link

D:\anaconda\envs\Keypoint\lib\site-packages\torch\include\c10/util/Optional.h(554): note: 查看对正在编译的 别名 模板 实例化“c10::OptionalBase<std::vector<at::Tensor,std::allocatorat::Tensor>>”的引用
D:\anaconda\envs\Keypoint\lib\site-packages\torch\include\torch\csrc\api\include\torch/optim/lbfgs.h(50): note: 查看对正在编译的 类 模板 实例化“c10::optional<std::vector<at::Tensor,std::allocatorat::Tensor>>”的引用
D:\anaconda\envs\Keypoint\lib\site-packages\torch\include\c10/util/Optional.h(446): warning C4624: “c10::trivially_copyable_optimization_optional_base”: 已将析构函数隐式定义为“已删除”
with
[
T=std::vector<at::Tensor,std::allocatorat::Tensor>
]
D:\code\pytorch3d\pytorch3d\csrc./pulsar/global.h(56): warning C4068: 未知的杂注“clang”
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(47): error C2039: "optional": 不是 "std" 的成员
D:\anaconda\envs\Keypoint\lib\site-packages\torch\include\c10/cuda/CUDAStream.h(244): note: 参见“std”的声明
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(47): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(47): error C2143: 语法错误: 缺少“,”(在“<”的前面)
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(78): error C2039: "optional": 不是 "std" 的成员
D:\anaconda\envs\Keypoint\lib\site-packages\torch\include\c10/cuda/CUDAStream.h(244): note: 参见“std”的声明
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(78): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(78): error C2143: 语法错误: 缺少“,”(在“<”的前面)
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(118): error C2039: "optional": 不是 "std" 的成员
D:\anaconda\envs\Keypoint\lib\site-packages\torch\include\c10/cuda/CUDAStream.h(244): note: 参见“std”的声明
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(118): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支 持默认 int
D:\code\pytorch3d\pytorch3d\csrc./pulsar/pytorch/renderer.h(118): error C2143: 语法错误: 缺少“,”(在“<”的前面)
error: command 'D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2

@bottler
Copy link
Contributor

bottler commented May 14, 2024

🤣 I can't read this, but I can guess what it says... 🤣

The latest commit bd52f4a on main has broken the ability to build pytorch3d with PyTorch older than 2.1 , because it relies on c10::optional being the same as std::optional. I imagine in the near future that change will either be reverted, or we will explicitly insist on newer pytorch. Meanwhile you can revert the change locally e.g. by git checkout 17117106e : the previous commit is 1711710 .

@bottler bottler changed the title ERROR std::optional pulsar build ERROR May 14, 2024
@bottler
Copy link
Contributor

bottler commented Aug 14, 2024

This got fixed.

@bottler bottler closed this as completed Aug 14, 2024
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