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
vision
Commits
9c31d1d5
Unverified
Commit
9c31d1d5
authored
May 24, 2021
by
Nicolas Hug
Committed by
GitHub
May 24, 2021
Browse files
Fix pointer to contiguous data in quantized roi_align (#3904)
parent
21049e90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
torchvision/csrc/ops/quantized/cpu/qroi_align_kernel.cpp
torchvision/csrc/ops/quantized/cpu/qroi_align_kernel.cpp
+6
-2
No files found.
torchvision/csrc/ops/quantized/cpu/qroi_align_kernel.cpp
View file @
9c31d1d5
...
...
@@ -23,11 +23,15 @@ void qroi_align_forward_kernel_impl(
bool
aligned
,
const
at
::
Tensor
&
t_rois
,
T
*
output
)
{
const
T
*
input
=
t_input
.
contiguous
().
data_ptr
<
T
>
();
// Don't delete these otherwise the .data_ptr() data might be undefined
auto
t_input_cont
=
t_input
.
contiguous
();
auto
t_rois_cont
=
t_rois
.
contiguous
();
const
T
*
input
=
t_input_cont
.
data_ptr
<
T
>
();
int64_t
input_zp
=
t_input
.
q_zero_point
();
float
input_scale
=
t_input
.
q_scale
();
const
T
*
rois
=
t_rois
.
cont
iguous
()
.
data_ptr
<
T
>
();
const
T
*
rois
=
t_rois
_
cont
.
data_ptr
<
T
>
();
int64_t
rois_zp
=
t_rois
.
q_zero_point
();
float
rois_scale
=
t_rois
.
q_scale
();
...
...
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