-
Notifications
You must be signed in to change notification settings - Fork 19
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
Problem with header files and static type of functions #12
Comments
Orio is only meant for annotating key loops, it really does not handle functions. Are you trying to annotate portions of code that contain multiple functions? In addition there should not be declarations in the annotated region. I can suggest other ways to do this if you cannot identify a specific loop suitable for Orio annotation. Results in search will be different depending on the search strategy and also because of system noise. Any search strategy (random, exhaustive, simplex, etc) is applicable to any code, with different tradeoff of accuracy and runtime. There is no way to know in advance which is best. |
@brnorris03 Thanks professor for replying and your explanation, Thanks, |
I will take a look! Sometimes you may provide a special initialization function (just for the autotuning), which is fairly straightforward. I will let you know if that's the case. |
@brnorris03 Thank you so much, I look forward to hearing from you. |
@brnorris03 Dear professor, I have another question, how can I substitute the default GCC compiler with LLVM or CLANG? Because I couldn't find any document or example about this matter and when I'm changing the default compiler to CLANG in the spec file, it returns some compiler errors while in the normal compilation, I don't have those.
|
I guess the issue is that LLVM's clang as of now doesn't support nested functions and this is the issue that gcc can handle by default, if not invoked by its standard c compiler (i.e. std=c99, etc). |
Sorry for the delay, it's a busy week. I think you may want to change the compiler options in the tuning spec, what is your compiler command line now (that you have in the tuning spec)? AFAIK clang can handle c99, e.g., clang -std=c99 should be supported in clang 5. So something like this in your tuning spec should fix the problem: |
Thanks @brnorris03 for the reply.
I was wondering if there is an easy workaround to fix this issue when we use clang with Orio. Thanks |
Hm, I am pretty sure we can get rid of function nesting, can you point me to one specific example in your repo in which I can see exactly where this is happening? |
For instance here, if you change gcc with 'clang' or 'clang -std=c99' or , I guess you should be able to reproduce that error as the first ___orio_perftest.c_is generated. |
Will try that. I noticed that you used 500 reps -- are you sure you need that many? Typically even for short-running tests, 100 or fewer should be fine. |
Thanks. |
@brnorris03 Did you have time to check the problem and test it with |
No, sorry, this is an incredibly busy time of the term, lots of Ph.D. defenses, comprehensive exams and conference organizing on top of usual teaching/research. It will be over in about 2 weeks, when I hope to devote my attention to this! |
@brnorris03 No problem, I see that you are fully busy with academic matters and I'm really grateful for your support about our problem. Actually, in our thesis, we are creating an optimization toolchain from high-level code to hardware synthesis in which we are using Orio for S2S level, LLVM compiler, and LegUp which is compatible with LLVM, not GCC. That's why, for consistency in the entire chain, it's crucial for us to have the LLVM in Orio transformation instead of GCC. |
@brnorris03 Dear Professor, did you have time to check the issue and fix the problem? |
I did look at it. I think this is not the best way to organize the code in terms of where the annotations are. Instead of enclosing everything in the tuning spec, the most minimal tunable code should be the only input to Orio, with the rest specified as part of initialization (separately compiled file). I can reorganize one of the examples in this manner. |
@brnorris03 |
@brnorris03 Thanks a million in advance for your valuable help and look forward to your response |
Hello,
It has been a long time that I'm using Orio to annotate CHStone benchmark codes toward my MSc thesis and really grateful for your valuable tool. Meanwhile, I have faced with lots of errors and could figure out how to solve them or what is the source of the issue in Orio but, I still have some doubt and questions though.
I wanted to know is there any workaround regards to those issues?
Also, What is your suggestion about the best search algorithm to choose compatible with Orio? Because I have been transferring the code for several times with the same search algorithm while Orio gave me different result in each iteration.
Thanks,
The text was updated successfully, but these errors were encountered: