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

How to generate C++ code for ResNet18 without optimizations? #74

Open
2212221352 opened this issue Dec 6, 2023 · 2 comments
Open

How to generate C++ code for ResNet18 without optimizations? #74

2212221352 opened this issue Dec 6, 2023 · 2 comments

Comments

@2212221352
Copy link

How can I generate C++ code for ResNet18 without the optimizations applied by ScaleHLS? Any suggestions?

@2212221352
Copy link
Author

I appreciate someone helping me, and I will be very grateful.

@HahaLan97
Copy link

So, scaleflow-pytorch-pipeline can take serveral options, one of which is debug-point. If you take a look at line 159 in lib/Transforms/Passes.cpp, you can see when debug-point is equal to one, there would be no optimization applied.
If I understand the code correctly, you can simply use something like this to do get the unoptimized code:

scalehls-opt resnet18.mlir --scaleflow-pytorch-pipeline="top-func=forward debug-point=1" -o unoptimized.mlir

But I don't think you can get any C++ code from this because in this file everything is not properly lowered/converted yet. Hope this helps you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants