Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single decode and batch decode cost time different #6

Open
basaltzhang opened this issue Mar 2, 2023 · 0 comments
Open

Single decode and batch decode cost time different #6

basaltzhang opened this issue Mar 2, 2023 · 0 comments

Comments

@basaltzhang
Copy link

Signle decode cost 137 ms per image
Batch decode cost 0.64 ms per image

I guess the reason is the torchnvjpeg.Decoder parameter different, so I set the param
without torch.cuda.current_stream(device_id), time is 137 ms
with torch.cuda.current_stream(device_id), time is 69 ms

So I suggest use below to initialize.
decoder = torchnvjpeg.Decoder(0, 0, True, device_id, batch_size, max_cpu_threads, max_image_size, torch.cuda.current_stream(device_id))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant