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
b0f9f7bc
Unverified
Commit
b0f9f7bc
authored
May 30, 2024
by
Nicolas Hug
Committed by
GitHub
May 30, 2024
Browse files
Use compiler.is_compiling() instead of deprecated _dynamo.is_compiling() (#8455)
parent
9b4b7423
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
torchvision/transforms/v2/functional/_geometry.py
torchvision/transforms/v2/functional/_geometry.py
+2
-2
No files found.
torchvision/transforms/v2/functional/_geometry.py
View file @
b0f9f7bc
...
...
@@ -194,7 +194,7 @@ def resize(
# according to our benchmarks on eager, non-AVX CPUs should still prefer u8->f32->interpolate->u8 path for bilinear
def
_do_native_uint8_resize_on_cpu
(
interpolation
:
InterpolationMode
)
->
bool
:
if
interpolation
==
InterpolationMode
.
BILINEAR
:
if
torch
.
_dynamo
.
is_compiling
():
if
torch
.
compiler
.
is_compiling
():
return
True
else
:
return
"AVX2"
in
torch
.
backends
.
cpu
.
get_cpu_capability
()
...
...
@@ -525,7 +525,7 @@ def _get_inverse_affine_matrix(
def
_compute_affine_output_size
(
matrix
:
List
[
float
],
w
:
int
,
h
:
int
)
->
Tuple
[
int
,
int
]:
if
torch
.
_dynamo
.
is_compiling
()
and
not
torch
.
jit
.
is_scripting
():
if
torch
.
compiler
.
is_compiling
()
and
not
torch
.
jit
.
is_scripting
():
return
_compute_affine_output_size_python
(
matrix
,
w
,
h
)
else
:
return
_compute_affine_output_size_tensor
(
matrix
,
w
,
h
)
...
...
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