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
ea3e9789
Unverified
Commit
ea3e9789
authored
Aug 23, 2021
by
pc
Committed by
GitHub
Aug 23, 2021
Browse files
fix parrots op bug (#1289)
parent
f022d577
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
mmcv/onnx/info.py
mmcv/onnx/info.py
+3
-1
mmcv/ops/csrc/parrots/sync_bn_parrots.cpp
mmcv/ops/csrc/parrots/sync_bn_parrots.cpp
+1
-1
No files found.
mmcv/onnx/info.py
View file @
ea3e9789
# Copyright (c) OpenMMLab. All rights reserved.
# Copyright (c) OpenMMLab. All rights reserved.
import
os
import
os
import
torch
def
is_custom_op_loaded
():
def
is_custom_op_loaded
():
flag
=
False
flag
=
False
...
@@ -16,4 +18,4 @@ def is_custom_op_loaded():
...
@@ -16,4 +18,4 @@ def is_custom_op_loaded():
flag
=
os
.
path
.
exists
(
ort_lib_path
)
flag
=
os
.
path
.
exists
(
ort_lib_path
)
except
(
ImportError
,
ModuleNotFoundError
):
except
(
ImportError
,
ModuleNotFoundError
):
pass
pass
return
flag
return
flag
or
torch
.
__version__
==
'parrots'
mmcv/ops/csrc/parrots/sync_bn_parrots.cpp
View file @
ea3e9789
...
@@ -45,7 +45,7 @@ void sync_bn_forward_output_cuda_parrots(CudaContext& ctx,
...
@@ -45,7 +45,7 @@ void sync_bn_forward_output_cuda_parrots(CudaContext& ctx,
auto
running_var
=
buildATensor
(
ctx
,
outs
[
1
]);
auto
running_var
=
buildATensor
(
ctx
,
outs
[
1
]);
auto
norm
=
buildATensor
(
ctx
,
outs
[
2
]);
auto
norm
=
buildATensor
(
ctx
,
outs
[
2
]);
auto
std
=
buildATensor
(
ctx
,
outs
[
3
]);
auto
std
=
buildATensor
(
ctx
,
outs
[
3
]);
auto
output
=
buildATensor
(
ctx
,
outs
[
3
]);
auto
output
=
buildATensor
(
ctx
,
outs
[
4
]);
sync_bn_forward_output_cuda
(
input
,
mean
,
var
,
running_mean
,
running_var
,
sync_bn_forward_output_cuda
(
input
,
mean
,
var
,
running_mean
,
running_var
,
weight
,
bias
,
norm
,
std
,
output
,
eps
,
momentum
,
weight
,
bias
,
norm
,
std
,
output
,
eps
,
momentum
,
group_size
);
group_size
);
...
...
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