-
Notifications
You must be signed in to change notification settings - Fork 158
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
docs(frontend): add performance tips section #919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, before adding new sections in the doc, let me sit a bit with @yuxizama, such that we define the architecture of files and doc. Then, we'll add the sections. Else, we keep adding files and files, and we add too much complexity
So blocking the PR for a moment please
Sure, we don't have to merge immediately, but let's improve the content as much as we can. We can just move it to wherever when we are ready to merge. |
It's very useful to have this kind of content for users! Thank you @umut-sahin |
f684e12
to
bad72ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great start to have this page. I would change the ordering, or maybe several section:
Improve parallelism
- Tensorize
- Dataflow
Optimize tlus
- Reduce number of tlus
- rounding/truncate maybe merged with approximate, as it's a optimization of the rounding?
- p-error
- bit extraction
- complex operations
- modules
bad72ca
to
870e299
Compare
I've grouped the tips by category 👍 |
870e299
to
02b2e6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not read the content but at least, where the new file is is OK with what we've agreed with Yuxi. So, if you want to merge when I'm off, good with me (but have it reviewed by someone, obviously).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this new documentation.
I have however a concern, which is that the new .md is very very long. I know from @yuxizama, and from our own experience, that we would like to have smaller .md's. We also wanted to try to keep a part of the doc for "simple" users, and some other parts for advanced users. I have moved eg some long & extensive part to "Explanation" part.
So I would maybe ask @yuxizama and @BourgerieQuentin what they think about this. In particular, we may consider
- splitting that into several md's
- and have an "Optimize tips" category on the left pane, instead of a single file
ba53ecd
to
995e855
Compare
I've split it in multiple files, let me know if you like it @bcm-at-zama 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @umut-sahin . Sorry, I still have a few concerns:
- I would not add this to where you've added it, but to Explanations; and I would add a short summary in the "easy part"
- some parts are not self contained, it's easy to fix
Let's have the opinion from @yuxizama before doing more changes.
To me,
I don't think we should split this to easy/hard. We need to have a place where users can see what they can do to improve the performance of their circuits, this is exactly that, grouped by performance considerations across different areas. It's a lot more organized than easy vs hard optimizations. |
These are in fact guides, more than explanations. |
To me, our doc used to be too long and too explanative. Users don't want to read a book, they want short things that they can do. For long things, I would use the Explanation part. We used to have lengthy lengthy things, I have tried to simplify this. |
Each page is like single page already, we can't make it shorter. And keeping all optimization ideas grouped is a lot better in my opinion as users won't need to jump entire different sections of the doc. |
'Guide' in the docs (C and CML) is more for deployment |
To me, it's too long for the easy part. See what I have done eg for
I have tried to make them small and just about what the simple user need to know/do. The full info has been moved. Let's @yuxizama dive in here |
Then they are not Plus, optimization is also important for actual deployment. |
Optimization is an advanced topic, I really don't think we should sprinkle some of it here and some of it there. Users can learn the library in the "easy" part, develop their application and when the time to optimize comes, they can read the "hard" part in one place to maximize their performance. Lastly, if we split these tips across the docs, they can even miss some of the tips as they could only look for one part. Anyway, I'll let @yuxizama and @BourgerieQuentin reply and then continue 👍 |
I'm aligned with @umut-sahin , I think splitting optimization tips across the documentation is a bad thing. The "easy part" should be simplest as possible just documenting features without any complexity, then a chapter regrouping optimization is a must have for me. It follow the development process, "make it works then make it fast". And I'm ok it's not explanations for me it should be a dedicated section of the documentation. |
We don't want to add a new section in the documentation too often. The main sections is decided by @yuxizama, has some common names with other products etc. |
We've decided for Short optim part: in Execution/Analysis |
995e855
to
078dcd8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @umut-sahin
Thanks for the update.
Before merging this, I just have 1 last thing to add:
Could you add a 1-sentence summary at the beginning of each doc, starting with "This document explains/provides/introduces .....". It gives readers an overview of what they will see in the doc.
You can find such examples in all the TFHE-rs doc, the "Get started" part of Concrete doc and part of CML and fhEVM doc. It's a format that I'm trying to use for all the docs.
Besides that, the rest of good for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this has not been completely modified, to take into accounts the previous reviews, right?
For the summary, I am quite happy: it gives a not too long overview, with some actions (ie, options) that the user can try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/optimization/optimize-cryptographic-parameters/composition.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks a lot @umut-sahin
(some compliance problems, however) |
a53fe2b
to
e2ca48b
Compare
(closes /~https://github.com/zama-ai/concrete-internal/issues/772)