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
c8b12fdb
Unverified
Commit
c8b12fdb
authored
Aug 04, 2021
by
Nicolas Hug
Committed by
GitHub
Aug 04, 2021
Browse files
Avoid cmyk in nvjpeg tests (#4246)
parent
3b8d51e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
test/test_image.py
test/test_image.py
+2
-1
No files found.
test/test_image.py
View file @
c8b12fdb
...
@@ -326,7 +326,8 @@ def test_decode_jpeg_cuda(mode, img_path, scripted):
...
@@ -326,7 +326,8 @@ def test_decode_jpeg_cuda(mode, img_path, scripted):
@
pytest
.
mark
.
parametrize
(
'cuda_device'
,
(
'cuda'
,
'cuda:0'
,
torch
.
device
(
'cuda'
)))
@
pytest
.
mark
.
parametrize
(
'cuda_device'
,
(
'cuda'
,
'cuda:0'
,
torch
.
device
(
'cuda'
)))
def
test_decode_jpeg_cuda_device_param
(
cuda_device
):
def
test_decode_jpeg_cuda_device_param
(
cuda_device
):
"""Make sure we can pass a string or a torch.device as device param"""
"""Make sure we can pass a string or a torch.device as device param"""
data
=
read_file
(
next
(
get_images
(
IMAGE_ROOT
,
".jpg"
)))
path
=
next
(
path
for
path
in
get_images
(
IMAGE_ROOT
,
".jpg"
)
if
'cmyk'
not
in
path
)
data
=
read_file
(
path
)
decode_jpeg
(
data
,
device
=
cuda_device
)
decode_jpeg
(
data
,
device
=
cuda_device
)
...
...
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