Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by PandixDevelopment · Mar 10 at 07:55 PM · networkoptimizationcpurambots

NN setup optimization

I (stupidly) used unity to make a complex neural network. The NN(Neural Network) Is entirly back end numbers and the only visuals are numbers on my screen in 2D that let me know how its going without any 3D features. Currently when its running my pc is at 12% CPU, 45% memory, 6% GPU, and my NN is at max 6fps I don't expect to ever get it over 20fps just hoping for better, but can't optomize the part of the code that causes the lag, Is is possible to give it more of my computer? I do not do anything else while its running so if other apps cannot run because 100% of the memory is used then thats ok.alt text

^ This is my pc and NN specs alt text

^ This is what it looks like but its not really that important though, and i don't plan to explain the meaning of the numbers.

screenshot-2022-03-10-150724.png (56.9 kB)
mergedimages.png (32.1 kB)
Comment
Add comment · Show 16
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image andrew-lukasik · Mar 10 at 08:32 PM 0
Share

Open a (standalone) profiler window, record some data first. There is hardly anything to talk about otherwise

avatar image PandixDevelopment andrew-lukasik · Mar 10 at 09:31 PM 0
Share

That would be used for optimizing the code which as I said is not an option. I am asking if Ican let unity use more of things like your computers ram cpu or gpu. By default it uses a very small amount of what can be used on my computer IE "12% CPU, 45% memory, 6% GPU" is whats being used when its doing the most calculations. I can't optimize the code itself because every single calculation is required other than small ones that have no effect. Everything that can be optimized is.

avatar image andrew-lukasik PandixDevelopment · Mar 10 at 09:50 PM 0
Share

That would be used for optimizing the code

Not necessarily. Profiler allows you to see what your CPU is doing in context of this unity application - in both detail and in overview.
I'm not sure where is that "12% CPU" stat is coming from and what it means exactly. But it might be telling you that you have many cores and only one of them is busy doing all the work. Whatever the answer - important thing to know.
Also, Profiler can tell how much time your app is spending doing the UI work. Inefficient or buggy UI can tank the fps too.
avatar image PandixDevelopment andrew-lukasik · Mar 10 at 09:53 PM 0
Share

I'll give a bit more background to what it is. There are 200 NNs each with around 200 inputs, 700 nodes, and over 750mil weights and biases. The nodes are calculated 10 times per frame using the weights and biases. In other words its a math problem with over 750mil numbers being calculated 2000 times per frame with different numbers. I need it to be calculated as many times in a second as it can be. I need to give it more of my pc to use not make it use less of what it has.

avatar image andrew-lukasik PandixDevelopment · Mar 10 at 10:05 PM 1
Share

I need to give it more of my pc

I totally sympathize with your sentiment, but this is not how computers work.

Improving program performance is done by either optimizing bottlenecks or multithreading it. Without any profiling at all, you can can have gazilion numbers being crunched by a single thread where the other 11 has nothing to do, or worse: your CPU can be stuck on UI code doing nothing important and wasting his/your time.

Show more comments
avatar image Captain_Pineapple · Mar 11 at 12:37 PM 0
Share

andrew already correctly layed out all issues with your question. why is optimizing your code not an option?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by VanToRiaXVII · Mar 11 at 04:31 PM

  1. You can make your code multi-thread using Unity DOTS (https://learn.unity.com/tutorial/what-is-dots-and-why-is-it-important?signup=true#5ef9fe65edbc2a002094eff5)

  2. You can find a high-clock CPU on the cloud, which would allow you to make more calculations in the same amount of time.

  3. You could use more of your GPU instead of relying on the CPU to do all the work. Here's a project that uses C# to call the GPU and use its processing power to do the required calculations: https://github.com/lepoco/CUDAfy.NET

Here's an implementation of that project: https://w8isms.blogspot.com/2013/04/gpgpu-performance-tests.html

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

170 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

VideoPlayer is choppy while preparing and before playing. 0 Answers

Batching problem. (objects with shared material are not being batched) 2 Answers

Wich one of these is Less CPU Consuming? 0 Answers

Why is the CPU usage so high? 1 Answer

Why do my Coroutines allocate memory when they execute? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges