question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[llbm] miBench dataset has optnone function attribute set

See original GitHub issue

🐛 Bug

I am not sure whether it is a bug, or perhaps it is due to the dataset?

I run the e-greedy algorithm https://github.com/facebookresearch/CompilerGym/blob/development/leaderboard/llvm_instcount/e_greedy/e_greedy.py on mibench. The results seems does not make sense at all: all rewards are 0 in terms of instruction count.

I don’t think it is due the implementation of e_greedy.py. Actually I wrote one version of greedy algorithm and it has the same results.

Why this happen? any problem in the benchmark? should we add some notes about this in the website?

To Reproduce

Steps to reproduce the behavior:

  1. python e_greedy.py --n=1 --epsilon=0 --test_dataset=mibench-v0 --leaderboard_results=greedy_mibench.csv

greedy_mibench.csv

Environment

Please fill in this checklist:

  • CompilerGym: 0.2.1
  • How you installed CompilerGym (conda, pip, source): pip
  • OS: Ubuntu 18.04
  • Python version: 3.6.9
  • Build command you used (if compiling from source):
  • GCC/clang version (if compiling from source):
  • Bazel version (if compiling from source):
  • Versions of any other relevant libraries:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ChrisCumminscommented, Dec 10, 2021

No, just update references from mibench-v0 to mibench-v1.

Cheers, Chris

0reactions
yqtianustcommented, Dec 10, 2021

Thanks. I will have a try. Do I need to manually remove the cache of the old version mibench?

Read more comments on GitHub >

github_iconTop Results From Across the Web

D28404 IRGen: Add optnone attribute on function during O0
Track whether we need to add the optnone LLVM attribute, // starting with the ... And Os/Oz set OptimizationLevel to 2, which is...
Read more >
LLVM Environment Reference — CompilerGym 0.2.5 ...
A validatable dataset is one where the behavior of the benchmarks can be checked by compiling the programs to binaries and executing them....
Read more >
[llvm-dev] Revisiting/refining the definition of ... - Google Groups
I consider this a bug - in that optnone is used to implement -O0 for LTO ... This function attribute indicates that most...
Read more >
Prevent Clang/LLVM from inlining or removing ... - GitHub
Clang/LLVM can inline or remove MPIR_Breakpoint as dead function. Can the optnone attribute be added to the MPIR_Breakpoint function to ...
Read more >
In clang, how do you use per-function optimization attributes?
As advocated by @dulacc in his comment, __attribute__ ((optnone)) works on clang 9.0.0 on Mac's High Sierra.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found