Skip to content

Remove deprecated Tensor::type() calls #123

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sabeekpradhan
Copy link

Tensor::type() has been deprecated since PyTorch v1.5.0, and the requisite information can be found instead via Tensor::device() and Tensor::scalar_type() (indeed, these two methods are used to construct the value of the type() function from v1.5.0 onwards).

On a Jetson Orin with PyTorch 2.6.0, attempting to compile the MS Deformable Attention fails on main with

/code/MaskDINO/maskdino/modeling/pixel_decoder/ops/src/cuda/ms_deform_attn_cuda.cu(139): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists

But this PR fixes it by removing the deprecated calls and replacing them with the newer Tensor::device() and Tensor::scalar_type() calls.

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.

1 participant