-
Notifications
You must be signed in to change notification settings - Fork 143
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
Feature Request: Add support for ScatterElements operator during compilation #531
Comments
Hello, the team is remote for the end of the week, so we'll answer next week. Would it be possible you share your code, to simplify the reproduction of the error? Or, at least, could you show us your model with Brevitas layers? |
Hello, I have just emailed hello@zama.ai the GNN model with Brevitas layers code. I would be grateful if you could help to take a look. Thank you! |
Great, we'll have a look! As I said, it's for next week, you'll have to be a bit patient :) |
Hi! thanks for sending the code! Great job converting your network to Brevitas. Here are a few answers:
` |
And obviously @fabecode, for the information @andrei-stoian-zama is asking you: you can send to my email address if you prefer things to be confidential. Just make sure it opens well, we've had issues before. |
Hi Andrei and Benoit, thank you for the prompt reply! Here are my responses to the questions:
|
Hello @andrei-stoian-zama @bcm-at-zama, I would also like to inquire if there is an anticipated timeline for the implementation of Scatter Elements? And if there is any way I could try to contribute to the implementation process? Thank you! |
Hello again and thank you for the code ! Unfortunately I can't give a deadline for this. It would take a bit of work in both Concrete ML and Concrete. |
I see, thanks again! |
Yes @fabecode , sorry but it's certainly a complicated task to do for an external person. We should have it in 2024, hopefully! If you want to contribute, can we encourage you to participate to our bounties? https://github.com/zama-ai/bounty-and-grant-program |
Thank you, will be happy to participate in the bounties when I have the time! Actually, the GNN project I have embarked on is part of my undergraduate final thesis which is due very soon, and my university has just given the green light for me to apply for the Zama Grant Program. The final leg would be the compilation of the model to be TFHE compatible, so would be really grateful if you happen to have suggestions on temporary workarounds to the ScatterElements error that I can try out 🙏 |
For workarounds: is the indexing matrix a constant? I seem to think so, can you confirm ?
is |
Yes, I just checked, |
Ok, and edge_index seems to be a list of values. If it's the same length as
note that using such a constant matrix in your program won't work directly, as the matrix will be quantized. I think you should create a ScatterElements operator in Concrete ML and in its quantized computation definition you could use such a permutation matrix (provided the scattering is a 1d permutation) |
Thank you so much @andrei-stoian-zama for the suggestions, will try it out! |
I'm afraid I don't know how to help more on this. As a first step you should try to determine which torch operator produces ScatterElements. I don't think it's the concatenation though. |
No worries, I really appreciate all your advice thus far! I will do my best to find a temporary alternative to ScatterElements. |
Summary
I have implemented a GNN model, quantised using Brevitas, and compiled using 'compile_brevitas_qat_model'.
During the compilation, I face the following error: "ValueError: The following ONNX operators are required to convert the torch model to numpy but are not currently implemented: ScatterElements."
Would it be possible to add ScatterElements as a supported operator, or is there any suggested workarounds? Thank you!
The text was updated successfully, but these errors were encountered: