Skip to content

torchac install failed with torch==1.2 #8

@marcocrxu

Description

@marcocrxu

At first, my environment is ubuntu 18.04, torch 1.2(which is recommended in SReC), python 3.7, nvcc 10.1, gcc 5.4.0, which is the same as environment shown in this repo.
And I met errors below:
Compiling, cuda_support=False
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'extra_compile_args'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
creating torchac_backend_cpu.egg-info
writing torchac_backend_cpu.egg-info/PKG-INFO
writing dependency_links to torchac_backend_cpu.egg-info/dependency_links.txt
writing top-level names to torchac_backend_cpu.egg-info/top_level.txt
writing manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
reading manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
writing manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'torchac_backend_cpu' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/home
creating build/temp.linux-x86_64-3.6/home/xu
creating build/temp.linux-x86_64-3.6/home/xu/桌面
creating build/temp.linux-x86_64-3.6/home/xu/桌面/L3C-PyTorch
creating build/temp.linux-x86_64-3.6/home/xu/桌面/L3C-PyTorch/src
creating build/temp.linux-x86_64-3.6/home/xu/桌面/L3C-PyTorch/src/torchac
creating build/temp.linux-x86_64-3.6/home/xu/桌面/L3C-PyTorch/src/torchac/torchac_backend
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/xu/.local/lib/python3.6/site-packages/torch/include -I/home/xu/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/xu/.local/lib/python3.6/site-packages/torch/include/TH -I/home/xu/.local/lib/python3.6/site-packages/torch/include/THC -I/usr/include/python3.6m -c /home/xu/桌面/L3C-PyTorch/src/torchac/torchac_backend/torchac.cpp -o build/temp.linux-x86_64-3.6/home/xu/桌面/L3C-PyTorch/src/torchac/torchac_backend/torchac.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=torchac_backend_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
.....
In file included from /home/xu/.local/lib/python3.6/site-packages/torch/include/c10/core/Device.h:5:0, from /home/xu/.local/lib/python3.6/site-packages/torch/include/c10/core/Allocator.h:6, from /home/xu/.local/lib/python3.6/site-packages/torch/include/ATen/ATen.h:3, from /home/xu/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/xu/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4, from /home/xu/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3, from /home/xu/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3, from /home/xu/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3, from /home/xu/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3, from /home/xu/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4, from /home/xu/.local/lib/python3.6/site-packages/torch/include/torch/extension.h:4, from /home/xu/桌面/L3C-PyTorch/src/torchac/torchac_backend/torchac.cpp:20: /home/xu/.local/lib/python3.6/site-packages/torch/include/c10/util/Exception.h:314:13: 附注:在此声明 inline void deprecated_AT_CHECK() {} ^ /home/xu/桌面/L3C-PyTorch/src/torchac/torchac_backend/torchac.cpp:137:5: 错误:expected ‘;’ before ‘const’ const int N_sym = s[1] * s[2]; ^ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
And then my partner realize that in L3C there's a line. They say that torch We tested this code with Python 3.7 and PyTorch 1.1. PyTorch 1.2 is not supported, but progress is tracked in #5.
then i retry with torch 1.1. Everything is OK then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions