Skip to content
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

[Help Wanted] How to only generate sequential models #138

Open
winnylyc opened this issue Apr 10, 2024 · 2 comments
Open

[Help Wanted] How to only generate sequential models #138

winnylyc opened this issue Apr 10, 2024 · 2 comments
Labels
user question Users do not understand somewhere of NNSmith

Comments

@winnylyc
Copy link

Hello, sorry for disturbing you.

I am currently testing a machine learning compiler that only accepts sequential models. I would like to know if there is a straightforward method to configure NNSmith in a way that it exclusively generates sequential models. (The sequntial model here means the model can be implemented by only using one torch.nn.Sequential())

Looking foward to your response!
Thanks a lot!

@ganler
Copy link
Member

ganler commented Apr 10, 2024

Some similar feature request was proposed in #117 and implemented in #119, which aims to generate models with only one input and one output.

But that is slightly different from your goal to generate a sequential model as this mode can have parallel intermediate nodes.

But you know all models can be sequential or non-sequential per the definition of a "layer". If you regard compound operators as a whole then every multiple operator can be regarded as a compound operator leading to a sequential model. But if you look at the primary operators (such as add) then the so-called sequential models (e.g., those using transformer blocks) are actually non-sequential. i.e., I think this problem first needs to be solved by definition. :D

@ganler ganler added the user question Users do not understand somewhere of NNSmith label Apr 10, 2024
@winnylyc
Copy link
Author

Thank you for your quick response!
The concept of the "compound operator" you mentioned is indeed relevant to the compiler I am going to test. I am currently further confirming on the extent to which the compound operator can express by the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user question Users do not understand somewhere of NNSmith
Projects
None yet
Development

No branches or pull requests

2 participants