Unverified Commit b2f188eb authored by Vasilis Vryniotis's avatar Vasilis Vryniotis Committed by GitHub
Browse files

Replace deprecated AutoNonVariableTypeMode with AutoDispatchBelowADInplaceOrView. (#3786)


Co-authored-by: default avatarFrancisco Massa <fvsmassa@gmail.com>
parent b3277345
......@@ -27,7 +27,7 @@ class DeformConv2dFunction
int64_t groups,
int64_t offset_groups,
bool use_mask) {
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto output = deform_conv2d(
input,
weight,
......@@ -142,7 +142,7 @@ class DeformConv2dBackwardFunction
int64_t groups,
int64_t offset_groups,
bool use_mask) {
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto result = detail::_deform_conv2d_backward(
grad,
input,
......
......@@ -24,7 +24,7 @@ class PSROIAlignFunction
ctx->saved_data["pooled_width"] = pooled_width;
ctx->saved_data["sampling_ratio"] = sampling_ratio;
ctx->saved_data["input_shape"] = input.sizes();
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto result = ps_roi_align(
input,
rois,
......@@ -89,7 +89,7 @@ class PSROIAlignBackwardFunction
int64_t channels,
int64_t height,
int64_t width) {
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto grad_in = detail::_ps_roi_align_backward(
grad,
rois,
......
......@@ -21,7 +21,7 @@ class PSROIPoolFunction : public torch::autograd::Function<PSROIPoolFunction> {
ctx->saved_data["pooled_height"] = pooled_height;
ctx->saved_data["pooled_width"] = pooled_width;
ctx->saved_data["input_shape"] = input.sizes();
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto result =
ps_roi_pool(input, rois, spatial_scale, pooled_height, pooled_width);
......@@ -78,7 +78,7 @@ class PSROIPoolBackwardFunction
int64_t channels,
int64_t height,
int64_t width) {
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto grad_in = detail::_ps_roi_pool_backward(
grad,
rois,
......
......@@ -26,7 +26,7 @@ class ROIAlignFunction : public torch::autograd::Function<ROIAlignFunction> {
ctx->saved_data["aligned"] = aligned;
ctx->saved_data["input_shape"] = input.sizes();
ctx->save_for_backward({rois});
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto result = roi_align(
input,
rois,
......@@ -85,7 +85,7 @@ class ROIAlignBackwardFunction
int64_t width,
int64_t sampling_ratio,
bool aligned) {
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto result = detail::_roi_align_backward(
grad,
rois,
......
......@@ -21,7 +21,7 @@ class ROIPoolFunction : public torch::autograd::Function<ROIPoolFunction> {
ctx->saved_data["pooled_height"] = pooled_height;
ctx->saved_data["pooled_width"] = pooled_width;
ctx->saved_data["input_shape"] = input.sizes();
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto result =
roi_pool(input, rois, spatial_scale, pooled_height, pooled_width);
......@@ -78,7 +78,7 @@ class ROIPoolBackwardFunction
int64_t channels,
int64_t height,
int64_t width) {
at::AutoNonVariableTypeMode g;
at::AutoDispatchBelowADInplaceOrView g;
auto grad_in = detail::_roi_pool_backward(
grad,
rois,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment