Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
538bdaac
Unverified
Commit
538bdaac
authored
Jan 06, 2023
by
Mashiro
Committed by
GitHub
Jan 06, 2023
Browse files
[Fix] Fix c++/cuda lint failed (#2528)
* Fix c/cuda lint failed * minor refine * minor refine
parent
73856344
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
82 deletions
+62
-82
mmcv/ops/csrc/pytorch/npu/psa_mask_npu.cpp
mmcv/ops/csrc/pytorch/npu/psa_mask_npu.cpp
+62
-82
No files found.
mmcv/ops/csrc/pytorch/npu/psa_mask_npu.cpp
View file @
538bdaac
...
...
@@ -3,15 +3,10 @@
using
namespace
NPU_NAME_SPACE
;
using
namespace
std
;
void
psamask_forward_npu
(
const
int
psa_type
,
const
Tensor
x
,
Tensor
y
,
const
int
num
,
const
int
h_feature
,
const
int
w_feature
,
const
int
h_mask
,
const
int
w_mask
,
const
int
half_h_mask
,
void
psamask_forward_npu
(
const
int
psa_type
,
const
Tensor
x
,
Tensor
y
,
const
int
num
,
const
int
h_feature
,
const
int
w_feature
,
const
int
h_mask
,
const
int
w_mask
,
const
int
half_h_mask
,
const
int
half_w_mask
)
{
int64_t
psa_type_i64
=
psa_type
;
int64_t
num_i64
=
num
;
...
...
@@ -36,26 +31,16 @@ void psamask_forward_npu(const int psa_type,
.
Run
();
}
void
psamask_forward_impl
(
const
int
psa_type
,
const
Tensor
x
,
Tensor
y
,
const
int
num
,
const
int
h_feature
,
const
int
w_feature
,
const
int
h_mask
,
const
int
w_mask
,
const
int
half_h_mask
,
void
psamask_forward_impl
(
const
int
psa_type
,
const
Tensor
x
,
Tensor
y
,
const
int
num
,
const
int
h_feature
,
const
int
w_feature
,
const
int
h_mask
,
const
int
w_mask
,
const
int
half_h_mask
,
const
int
half_w_mask
);
void
psamask_backward_npu
(
const
int
psa_type
,
const
Tensor
y_grad
,
Tensor
x_grad
,
const
int
num
,
const
int
h_feature
,
const
int
w_feature
,
const
int
h_mask
,
const
int
w_mask
,
const
int
half_h_mask
,
void
psamask_backward_npu
(
const
int
psa_type
,
const
Tensor
y_grad
,
Tensor
x_grad
,
const
int
num
,
const
int
h_feature
,
const
int
w_feature
,
const
int
h_mask
,
const
int
w_mask
,
const
int
half_h_mask
,
const
int
half_w_mask
)
{
int64_t
psa_type_i64
=
psa_type
;
int64_t
num_i64
=
num
;
...
...
@@ -80,15 +65,10 @@ void psamask_backward_npu(const int psa_type,
.
Run
();
}
void
psamask_backward_impl
(
const
int
psa_type
,
const
Tensor
y_grad
,
Tensor
x_grad
,
const
int
num
,
const
int
h_feature
,
const
int
w_feature
,
const
int
h_mask
,
const
int
w_mask
,
const
int
half_h_mask
,
void
psamask_backward_impl
(
const
int
psa_type
,
const
Tensor
y_grad
,
Tensor
x_grad
,
const
int
num
,
const
int
h_feature
,
const
int
w_feature
,
const
int
h_mask
,
const
int
w_mask
,
const
int
half_h_mask
,
const
int
half_w_mask
);
REGISTER_NPU_IMPL
(
psamask_forward_impl
,
psamask_forward_npu
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment