Adding memory and graph stats (#156)#1858
Conversation
* Add memory, graph stats * fix import formatting issues * sort imports * sort imports
vidyasiv
left a comment
There was a problem hiding this comment.
Thanks for your PR @jaygala223 !
Could you run inference 1 HPU and 8 HPU from https://github.com/huggingface/optimum-habana/tree/main/examples/image-to-text#inference-with-mixed-precision-bf16 with your changes and paste the results please?
|
Hi @vidyasiv, thanks for reviewing my PR. I will attach the screenshots and address your comments. |
1 HPU README testingOutput 8 HPU README testingOutput |
| stats = "" | ||
| stats = stats + f"\nThroughput (including tokenization) = {throughput} tokens/second" | ||
| stats = stats + f"\nNumber of HPU graphs = {count_hpu_graphs()}" | ||
| separator = "-" * len(stats) |
There was a problem hiding this comment.
There was a problem hiding this comment.
Hi @libinta, thanks for the review. I have not used this before and for this PR I took reference from for the following:
|
@jaygala223 Can you merge the main branch into yours to make sure it's up to date please? The doc build workflow failed because of this |
|
Sure |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |

Add memory, graph stats
fix import formatting issues
sort imports
sort imports
What does this PR do?
Prints stats like graph compilation duration, num graphs, and memory at the end of the run