Giter Site home page Giter Site logo

Comments (11)

GreenTeaHua avatar GreenTeaHua commented on June 17, 2024

1.0是ok的

from deformable-convolution-v2-pytorch.

cqray1990 avatar cqray1990 commented on June 17, 2024

i use pytorch 1.1.0,but i can not build it,how to modify the setup.py file

from deformable-convolution-v2-pytorch.

Feynman1999 avatar Feynman1999 commented on June 17, 2024

i use pytorch 1.1.0,but i can not build it,how to modify the setup.py file

i have not modified it, and is ok! just run in git bash

from deformable-convolution-v2-pytorch.

StrongerzZ avatar StrongerzZ commented on June 17, 2024

I have some problem when run make.sh, can someone help me? @Feynman1999 @GreenTeaHua
Thanks a lot!
非常感谢!

win10
pytorch==1.2.0
torchvision==0.4.0
cudatoolkit=10.0

When I run in bash.exe:

LAPTOP-Q1FG2KNI MINGW64 /bin
$ cd D:\NNDL_pytorch\Deformable-Convolution-V2-PyTorch-master
LAPTOP-Q1FG2KNI MINGW64 /d/NNDL_pytorch/Deformable-Convolution-V2-PyTorch-master
$ sh make.sh
nvcc warning : The -std=c++11 flag is not supported with the configured host compiler. Flag will be ignored.
deform_conv_cuda_kernel.cu
cl: 命令行 warning D9002 :忽略未知选项“-fPIC”
deform_conv_cuda_kernel.cu
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h: warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(825): warning C4819: 该文件包含不 能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(1760): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(2622): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(3461): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(4404): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(5302): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(6213): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
cl: 命令行 warning D9002 :忽略未知选项“-fPIC”
deform_psroi_pooling_cuda.cu
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h: warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失

Here are lots of warning like above, and I don't show them all.

Traceback (most recent call last):
File "build.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'
Traceback (most recent call last):
File "build_modulated.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'


When I run in pycharm:

D:\NNDL_pytorch\Deformable-Convolution-V2-PyTorch-master>G:/Git/bin/sh D:/NNDL_pytorch/Deformable-Convolution-V2-PyTorch-master/make.sh
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
Traceback (most recent call last):
File "build.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'
Traceback (most recent call last):
File "build_modulated.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'

from deformable-convolution-v2-pytorch.

Feynman1999 avatar Feynman1999 commented on June 17, 2024

I have some problem when run make.sh, can someone help me? @Feynman1999 @GreenTeaHua
Thanks a lot!
非常感谢!

win10

pytorch==1.2.0
torchvision==0.4.0
cudatoolkit=10.0

When I run in bash.exe:

LAPTOP-Q1FG2KNI MINGW64 /bin
$ cd D:\NNDL_pytorch\Deformable-Convolution-V2-PyTorch-master
LAPTOP-Q1FG2KNI MINGW64 /d/NNDL_pytorch/Deformable-Convolution-V2-PyTorch-master
$ sh make.sh
nvcc warning : The -std=c++11 flag is not supported with the configured host compiler. Flag will be ignored.
deform_conv_cuda_kernel.cu
cl: 命令行 warning D9002 :忽略未知选项“-fPIC”
deform_conv_cuda_kernel.cu
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h: warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(825): warning C4819: 该文件包含不 能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(1760): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(2622): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(3461): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(4404): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(5302): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(6213): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
cl: 命令行 warning D9002 :忽略未知选项“-fPIC”
deform_psroi_pooling_cuda.cu
c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h: warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失

Here are lots of warning like above, and I don't show them all.

Traceback (most recent call last):
File "build.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'
Traceback (most recent call last):
File "build_modulated.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'

When I run in pycharm:

D:\NNDL_pytorch\Deformable-Convolution-V2-PyTorch-master>G:/Git/bin/sh D:/NNDL_pytorch/Deformable-Convolution-V2-PyTorch-master/make.sh
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
nvcc fatal : Cannot find compiler 'cl.exe' in PATH
Traceback (most recent call last):
File "build.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'
Traceback (most recent call last):
File "build_modulated.py", line 2, in
import torch
ModuleNotFoundError: No module named 'torch'

It looks like that you are in wrong env(no torch module), have you activated the env that include the torch module?

from deformable-convolution-v2-pytorch.

StrongerzZ avatar StrongerzZ commented on June 17, 2024

It looks like that you are in wrong env(no torch module), have you activated the env that include the torch module?

I use conda to build my pytorch env, how to activate it correctly in Git or Pycharm(terminal)?
I try conda activate in Git, it doesn't work.
I try conda activate in Pycharm(terminal), but it has already been activated.
and it seems like when I use pycharm to run .sh, it has the "nvcc fatal",
when I use Git, ncvv is ok, but it can't compile .sh

from deformable-convolution-v2-pytorch.

Feynman1999 avatar Feynman1999 commented on June 17, 2024

It looks like that you are in wrong env(no torch module), have you activated the env that include the torch module?

I use conda to build my pytorch env, how to activate it correctly in Git or Pycharm(terminal)?
I try conda activate in Git, it doesn't work.
I try conda activate in Pycharm(terminal), but it has already been activated.
and it seems like when I use pycharm to run .sh, it has the "nvcc fatal",
when I use Git, ncvv is ok, but it can't compile .sh

I run "conda activate envname" in the gitbash, and run "sh make.sh", everything is just ok.
maybe you should check these:

  • try to make "conda activate envname" works in gitbash
  • in windows cmd , input "nvcc -V", check whether cuda works

from deformable-convolution-v2-pytorch.

StrongerzZ avatar StrongerzZ commented on June 17, 2024

I run "conda activate envname" in the gitbash, and run "sh make.sh", everything is just ok.
maybe you should check these:

  • try to make "conda activate envname" works in gitbash
  • in windows cmd , input "nvcc -V", check whether cuda works

I get the right way to activate my pytorch_envs, thanks.
but it seems like need some modify to correctly run make.sh.
I made some attempts, but still have problems, it might be the version of pytorch.

I changed from torch.utils.ffi import create_extension to from torch.utils.cpp_extension import BuildExtension and modified the related function names in build.py and build_modulated.py.

Now the error is:

Including CUDA code.
D:\NNDL_pytorch\Deformable-Convolution-V2-PyTorch-master
Traceback (most recent call last):
File "build.py", line 32, in
extra_compile_args=['-std=c++11']
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\site-packages\torch\utils\cpp_extension.py", line 233, in init
super(BuildExtension, self).init(*args, **kwargs)
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\site-packages\setuptools_init_.py", line 163, in init
Command.init(self, dist)
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\distutils\cmd.py", line 57, in init
raise TypeError("dist must be a Distribution instance")
TypeError: dist must be a Distribution instance
Including CUDA code.
D:\NNDL_pytorch\Deformable-Convolution-V2-PyTorch-master
Traceback (most recent call last):
File "build_modulated.py", line 39, in
extra_compile_args=extra_compile_args
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\site-packages\torch\utils\cpp_extension.py", line 233, in init
super(BuildExtension, self).init(*args, **kwargs)
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\site-packages\setuptools_init
.py", line 163, in init
_Command.init(self, dist)
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\distutils\cmd.py", line 57, in init
raise TypeError("dist must be a Distribution instance")
TypeError: dist must be a Distribution instance

Anyway, thank you again! @Feynman1999
Still waiting for a solution to the problem and I don't want to change my envs version...

from deformable-convolution-v2-pytorch.

GinkgoX avatar GinkgoX commented on June 17, 2024

When I compile make.sh, the ERROR encounters, How to solve this?

Traceback (most recent call last):
File "build_modulated.py", line 40, in
extra_compile_args=extra_compile_args
File "D:\ProgramData\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py", line 234, in init
super(BuildExtension, self).init(*args, **kwargs)
File "D:\ProgramData\Anaconda3\lib\site-packages\setuptools_init_.py", line 163, in init
_Command.init(self, dist)
File "D:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 57, in init
raise TypeError("dist must be a Distribution instance")
TypeError: dist must be a Distribution instance

from deformable-convolution-v2-pytorch.

Singapore-mor avatar Singapore-mor commented on June 17, 2024

I run "conda activate envname" in the gitbash, and run "sh make.sh", everything is just ok.
maybe you should check these:

  • try to make "conda activate envname" works in gitbash
  • in windows cmd , input "nvcc -V", check whether cuda works

I get the right way to activate my pytorch_envs, thanks.
but it seems like need some modify to correctly run make.sh.
I made some attempts, but still have problems, it might be the version of pytorch.

I changed from torch.utils.ffi import create_extension to from torch.utils.cpp_extension import BuildExtension and modified the related function names in build.py and build_modulated.py.

Now the error is:

Including CUDA code.
D:\NNDL_pytorch\Deformable-Convolution-V2-PyTorch-master
Traceback (most recent call last):
File "build.py", line 32, in
extra_compile_args=['-std=c++11']
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\site-packages\torch\utils\cpp_extension.py", line 233, in init
super(BuildExtension, self).init(*args, **kwargs)
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\site-packages\setuptools__init__.py", line 163, in init
Command.init(self, dist) File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\distutils\cmd.py", line 57, in init raise TypeError("dist must be a Distribution instance") TypeError: dist must be a Distribution instance Including CUDA code. D:\NNDL_pytorch\Deformable-Convolution-V2-PyTorch-master Traceback (most recent call last): File "build_modulated.py", line 39, in extra_compile_args=extra_compile_args File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\site-packages\torch\utils\cpp_extension.py", line 233, in init super(BuildExtension, self).init(*args, **kwargs) File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\site-packages\setuptools__init_.py", line 163, in init
_Command.init(self, dist)
File "G:\NNDL\Anaconda3\envs\pytorch_envs\lib\distutils\cmd.py", line 57, in init
raise TypeError("dist must be a Distribution instance")
TypeError: dist must be a Distribution instance

Anyway, thank you again! @Feynman1999
Still waiting for a solution to the problem and I don't want to change my envs version...

你好,想问下你最后跑通了吗

from deformable-convolution-v2-pytorch.

Singapore-mor avatar Singapore-mor commented on June 17, 2024

When I compile make.sh, the ERROR encounters, How to solve this?

Traceback (most recent call last):
File "build_modulated.py", line 40, in
extra_compile_args=extra_compile_args
File "D:\ProgramData\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py", line 234, in init
super(BuildExtension, self).init(*args, **kwargs)
File "D:\ProgramData\Anaconda3\lib\site-packages\setuptools__init__.py", line 163, in init
_Command.init(self, dist)
File "D:\ProgramData\Anaconda3\lib\distutils\cmd.py", line 57, in init
raise TypeError("dist must be a Distribution instance")
TypeError: dist must be a Distribution instance

请问你最后解决了问题吗?

from deformable-convolution-v2-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.