Skip to content

Commit

Permalink
Removing VISION_API from backward() methods and adding an ops.h (#3163)
Browse files Browse the repository at this point in the history
* Removing VISION_API from backward() methods and adding a ops.h

* Fixing clang format.
  • Loading branch information
datumbox authored Dec 14, 2020
1 parent 45d9a30 commit 4eab7a6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 deletions.
1 change: 0 additions & 1 deletion torchvision/csrc/ops/deform_conv2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ VISION_API at::Tensor deform_conv2d(

namespace detail {

VISION_API
std::tuple<at::Tensor, at::Tensor, at::Tensor, at::Tensor, at::Tensor>
_deform_conv2d_backward(
const at::Tensor& grad,
Expand Down
8 changes: 8 additions & 0 deletions torchvision/csrc/ops/ops.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once

#include "deform_conv2d.h"
#include "nms.h"
#include "ps_roi_align.h"
#include "ps_roi_pool.h"
#include "roi_align.h"
#include "roi_pool.h"
2 changes: 1 addition & 1 deletion torchvision/csrc/ops/ps_roi_align.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ VISION_API std::tuple<at::Tensor, at::Tensor> ps_roi_align(

namespace detail {

VISION_API at::Tensor _ps_roi_align_backward(
at::Tensor _ps_roi_align_backward(
const at::Tensor& grad,
const at::Tensor& rois,
const at::Tensor& channel_mapping,
Expand Down
2 changes: 1 addition & 1 deletion torchvision/csrc/ops/ps_roi_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ VISION_API std::tuple<at::Tensor, at::Tensor> ps_roi_pool(

namespace detail {

VISION_API at::Tensor _ps_roi_pool_backward(
at::Tensor _ps_roi_pool_backward(
const at::Tensor& grad,
const at::Tensor& rois,
const at::Tensor& channel_mapping,
Expand Down
2 changes: 1 addition & 1 deletion torchvision/csrc/ops/roi_align.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ VISION_API at::Tensor roi_align(

namespace detail {

VISION_API at::Tensor _roi_align_backward(
at::Tensor _roi_align_backward(
const at::Tensor& grad,
const at::Tensor& rois,
double spatial_scale,
Expand Down
2 changes: 1 addition & 1 deletion torchvision/csrc/ops/roi_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ VISION_API std::tuple<at::Tensor, at::Tensor> roi_pool(

namespace detail {

VISION_API at::Tensor _roi_pool_backward(
at::Tensor _roi_pool_backward(
const at::Tensor& grad,
const at::Tensor& rois,
const at::Tensor& argmax,
Expand Down

0 comments on commit 4eab7a6

Please sign in to comment.