Comments (3)
I tried running two runs at the same time, and I got about the performance hit I would expect from having something on the other thread in a core, and I saw my CPU get fully utilized. I don't think using both threads in each core would really double performance, but it would increase it by a fair bit.
time python image_from_text.py --text='alien life' --seed=8 --torch
running alone:
real 0m59.319s
user 5m41.542s
sys 0m14.994s
And with another run also running at the same time:
real 1m36.393s
user 9m33.206s
sys 0m17.905s
User time counts time the same whether there's something on the other thread of your core stealing your CPU machinery or not, so look at the real time times. 59 seconds / (60 seconds + 36 seconds) = 61%, so if I run two runs simultaneously each runs at about 61% of the speed of a single run alone. If one single run could use all that compute it would be running at about 120% speed, or about 20% faster than it runs now.
from min-dalle.
I merged your pull request that adds the line torch.set_num_threads(os.cpu_count())
but it still doesn't seem to be using all the threads on my M1 macbook. I agree there should be a way to better utilize the cpu. I'm working on converting it to CoreML so that it can use the neural engine
from min-dalle.
Probably what we want is a --threads
option to let the user specify thread count, and then a default detector that works right on both Linux and M1 Mac.
from min-dalle.
Related Issues (20)
- Wrong Discord link
- GPU OOM if model ran in Python multithreading
- MPS backend not working
- huggingface 404not found HOT 1
- Training Pipeline
- RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' torch HOT 2
- Could you put in your documentation what version of python you are using?
- How is this different from github.com/kakaobrain/minDALL-E ? HOT 1
- New Replicate Github sign-in required and pricing question HOT 3
- YouTube video walk-through of this codebase HOT 2
- TextTokenizer never initializes when is_reusable is false
- Should this work, even if slowly, on just a 2080Ti? HOT 7
- Any plans to supporting multi-GPU inferencing and training?
- encoder.embed_tokens.weight is smaller than the size of the TextTokenizer vocabulary
- Saving images didn't work for me without changes.
- Bfloat16 - precision loss
- Project dependencies may have API risk issues
- Mini-Dalle in OCaml
- Size HOT 1
- Cannot register hook? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from min-dalle.