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

Low performance on Windows #5

Open
Migushthe2nd opened this issue Apr 12, 2020 · 8 comments
Open

Low performance on Windows #5

Migushthe2nd opened this issue Apr 12, 2020 · 8 comments

Comments

@Migushthe2nd
Copy link
Contributor

Migushthe2nd commented Apr 12, 2020

#2 (comment)

Not sure if this is a Pytorch thing on Windows or a CPU bottleneck because of the preprocessing.

If I look at this thread, it seems to me like it is caused by the preprocessing. According to a post, augmentation on the GPU should be possible.

@alew3
Copy link
Owner

alew3 commented Apr 12, 2020

That thread is talking about something different: data augmentation which is also called preprocessing.

I was referring to the preprocessing that is being done on the function make_animation on file /first-oder-model/demo.py lines 58-74 before running the neural net on line 75. Would have to dig into that code to see if optimization opportunities exist.

@Migushthe2nd
Copy link
Contributor Author

Migushthe2nd commented Apr 13, 2020

Oh alright I see now what you mean.

@Migushthe2nd
Copy link
Contributor Author

Migushthe2nd commented Apr 13, 2020

I find it really weird that when recording the while loop execution time in faceit_live.py there is no difference between python running on all six cores or on only a single one, though total cpu usage has decreased drastically. This can be seen in both Windows' task manager and third-party software. Cuda usage has not decreased.

@alew3
Copy link
Owner

alew3 commented Apr 13, 2020

There is a lot of OpenCV usage in the project, might be worth trying to compile OpenCV with GPU support to see if it makes a diference.

https://jamesbowley.co.uk/build-opencv-4-0-0-with-cuda-10-0-and-intel-mkl-tbb-in-windows/

@Migushthe2nd
Copy link
Contributor Author

Migushthe2nd commented Apr 13, 2020

Commenting out the process_image function at line 141 and directly writing the video_capture frame to a cv2 window has no performance issues (33fps camera footage and low cpu usage), so it won't make a difference.

@Migushthe2nd Migushthe2nd changed the title CPU bottleneck on Windows Low performance on Windows Apr 13, 2020
@Kshitiz-devops
Copy link

I tried and ran the application I have having the issue is with input where even the input is slow. I have Nvidia GeForce 940MX dedicated GPU of 2gb and gpu memory in total 7.9 gb including shared gpu memory. Is there any way to optimize it?

@shekharp77
Copy link

Hi, I am right now trying this on i7(9thg gen) 8gb ram and Nvidia GTX 1650 (4gb) and my GPU usage is not crossing 40% (task manager) while I am getting very less FPS and processing is not accurate as well.

@alew3
Copy link
Owner

alew3 commented Aug 27, 2020

Hi, I am right now trying this on i7(9thg gen) 8gb ram and Nvidia GTX 1650 (4gb) and my GPU usage is not crossing 40% (task manager) while I am getting very less FPS and processing is not accurate as well.

Window Task manager doesn't report the usage of the GPU correctly. Use the nvidia-smi command line, path=C:\Program Files\NVIDIA Corporation\NVSMI

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

4 participants