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

add pytorch 1.5 supported #58

Closed
wants to merge 1 commit into from
Closed

Conversation

lbin
Copy link

@lbin lbin commented Apr 14, 2020

No description provided.

@lbin lbin changed the title add pytorch 1,5 supported add pytorch 1.5 supported Apr 14, 2020
@@ -104,7 +104,7 @@ dcn_v2_cuda_forward(const at::Tensor &input,
const int block = 128;
const int grid = (batch + block - 1) / block;

createBatchGemmBuffer<<<grid, block, 0, THCState_getCurrentStream(state)>>>(
createBatchGemmBuffer<<<grid, block, 0, c10::cuda::getCurrentCUDAStream()>>>(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!
Could you please explain why the way getting a stream is changed? A link may be.
Thanks in advance.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I tried to use you branch with torch1.5 and https://github.com/xingyizhou/CenterTrack
CenterTrack couldn't import DCN.
Then I switched to torch1.4 and it worked just fine

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this version on my other projects and also centertrack, my suggestion is remove all your codes and find & rm pkg you installed in your python/pip/conda env

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!
Could you please explain why the way getting a stream is changed? A link may be.
Thanks in advance.
you success,can you share something this!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works for my case, cuda: 10.2, pytorch: 1.5

@austinmw
Copy link

austinmw commented Jun 24, 2020

@lbin Hi, thanks for this PR. I tested it with 1.5.1 and it worked for me. However I tried to use it with 1.6.0 (nightly 1.6.0.dev20200623+cu101') and was unable to compile and got RuntimeError: Error compiling objects for extension.

I think several deprecation warnings in 1.5 turned into errors, like:

warning: \u2018at::DeprecatedTypeProperties& at::Tensor::type() const\u2019 is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]

I'm a C++ novice myself, so if you happen to get any time to update this PR for future compatibility I'd really appreciate it.

(By the way using 1.6.0 for torch tracing support of dict output types)

Copy link

@MARMOTatZJU MARMOTatZJU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked for me on image buildt by this dockerfile, i.e., CUDA10.2 & CUDNN7 & PyTorch1.5.1
Thus consider merging it.

@lbin
Copy link
Author

lbin commented Nov 5, 2020

Pls follow https://github.com/lbin/DCNv2/tree/pytorch_1.6 for 1.6 support

@lbin lbin closed this Dec 7, 2020
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

Successfully merging this pull request may close these issues.

6 participants