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

[Fix] Fix parrots cpu compile bug #1129

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/bbox_overlaps_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
/*
* void bbox_overlaps_cuda(const Tensor bboxes1, const Tensor bboxes2, Tensor
* ious, const int mode, const bool aligned, const int offset);
Expand Down Expand Up @@ -35,3 +36,4 @@ PARROTS_EXTENSION_REGISTER(bbox_overlaps)
.output(1)
.apply(bbox_overlaps_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/carafe_naive_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
/*void carafe_naive_forward_cuda(Tensor features, Tensor masks, Tensor output,
* int kernel_size, int group_size,
* int scale_factor)
Expand Down Expand Up @@ -69,3 +70,4 @@ PARROTS_EXTENSION_REGISTER(carafe_naive_backward)
.output(2)
.apply(carafe_naive_backward_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/carafe_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
/*
* void carafe_forward_cuda(Tensor features, Tensor masks, Tensor rfeatures,
* Tensor routput, Tensor rmasks, Tensor output,
Expand Down Expand Up @@ -83,3 +84,4 @@ PARROTS_EXTENSION_REGISTER(carafe_backward)
.output(6)
.apply(carafe_backward_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/cc_attention_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
/*void ca_forward_cuda(const Tensor t, const Tensor f, Tensor weight);*/
void ca_forward_cuda_parrots(CudaContext &ctx, const SSElement &attr,
const OperatorBase::in_list_t &ins,
Expand Down Expand Up @@ -77,3 +78,4 @@ PARROTS_EXTENSION_REGISTER(ca_map_backward)
.output(2)
.apply(ca_map_backward_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/deform_conv_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
/*void deform_conv_forward_cuda(Tensor input, Tensor weight, Tensor offset,
* Tensor output, Tensor columns, Tensor ones,
* int kW, int kH, int dW, int dH, int padW,
Expand Down Expand Up @@ -177,3 +178,4 @@ PARROTS_EXTENSION_REGISTER(deform_conv_backward_parameters)
.output(3)
.apply(deform_conv_backward_parameters_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/deform_roi_pool_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
/*void deform_roi_pool_forward_cuda(Tensor input, Tensor rois, Tensor offset,
* Tensor output, int pooled_height,
* int pooled_width, float spatial_scale,
Expand Down Expand Up @@ -97,3 +98,4 @@ PARROTS_EXTENSION_REGISTER(deform_roi_pool_backward)
.output(2)
.apply(deform_roi_pool_backward_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/focal_loss_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
void sigmoid_focal_loss_forward_cuda_parrots(CudaContext& ctx,
const SSElement& attr,
const OperatorBase::in_list_t& ins,
Expand Down Expand Up @@ -108,3 +109,4 @@ PARROTS_EXTENSION_REGISTER(softmax_focal_loss_backward)
.output(2)
.apply(softmax_focal_loss_backward_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/masked_conv2d_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
void masked_im2col_forward_cuda_parrots(CudaContext& ctx, const SSElement& attr,
const OperatorBase::in_list_t& ins,
OperatorBase::out_list_t& outs) {
Expand Down Expand Up @@ -67,3 +68,4 @@ PARROTS_EXTENSION_REGISTER(masked_col2im_forward)
.output(1)
.apply(masked_col2im_forward_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/modulated_deform_conv_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using namespace parrots;

#ifdef MMCV_WITH_CUDA
void modulated_deform_conv_forward_cuda_parrots(
CudaContext& ctx, const SSElement& attr, const OperatorBase::in_list_t& ins,
OperatorBase::out_list_t& outs) {
Expand Down Expand Up @@ -114,3 +115,4 @@ PARROTS_EXTENSION_REGISTER(modulated_deform_conv_backward)
.output(7)
.apply(modulated_deform_conv_backward_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/sync_bn_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "sync_bn_pytorch.h"
using namespace parrots;

#ifdef MMCV_WITH_CUDA
void sync_bn_forward_mean_cuda_parrots(CudaContext& ctx, const SSElement& attr,
const OperatorBase::in_list_t& ins,
OperatorBase::out_list_t& outs) {
Expand Down Expand Up @@ -106,3 +107,4 @@ PARROTS_EXTENSION_REGISTER(sync_bn_backward_data)
.output(1)
.apply(sync_bn_backward_data_cuda_parrots)
.done();
#endif
2 changes: 2 additions & 0 deletions mmcv/ops/csrc/parrots/tin_shift_parrots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "tin_shift_pytorch.h"
using namespace parrots;

#ifdef MMCV_WITH_CUDA
void tin_shift_forward_cuda_parrots(CudaContext &ctx, const SSElement &attr,
const OperatorBase::in_list_t &ins,
OperatorBase::out_list_t &outs) {
Expand Down Expand Up @@ -34,3 +35,4 @@ PARROTS_EXTENSION_REGISTER(tin_shift_backward)
.output(1)
.apply(tin_shift_backward_cuda_parrots)
.done();
#endif