-
Notifications
You must be signed in to change notification settings - Fork 0
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
Get Loop Unrolling Example Working out of Tree #1
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Maybe we should move this examples repo to
facebookresearch
GitHub account?
Yes. For now, let's make this repo private.
- Had to modify the code (see all the lines with
FIXME
) from the top-of-trunk in CompilerGymdevelopment
branch to instead be compatible with the latest release of CompilerGym uploaded to PyPi
This is actually really useful as a canary for finding breaking changes 🙂
- To run clang commands,
llvm.clang_path()
didn't work so had to just use"clang"
for now. But maybe that's OK as we expect people to use their own clang?
Odd. What was the error?
- As of now, when running the example, I am getting this error:
Comment left inline to fix that.
Cheers,
Chris
|
||
def __init__(self): | ||
super().__init__( | ||
id="size", # name="size", #FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this one to my attention! I've added a workaround so that the old Reward.id won't break when we next push a release: facebookresearch/CompilerGym#612
# FIXME: yield from (f"benchmark://unrolling-v0{k}" for k in self._benchmarks.keys()) | ||
yield from self._benchmarks.keys() | ||
|
||
def benchmark(self, uri: str) -> Benchmark: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename benchmark_from_parsed_uris
to fix this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Chris. It fixed it, but then got another error down the line:
Traceback (most recent call last):
File "example_unrolling_service/example_without_bazel.py", line 171, in <module>
observation = env.reset()
File "/Users/melhoushi/opt/anaconda3/envs/compiler_gym_examples/lib/python3.8/site-packages/compiler_gym/envs/compiler_env.py", line 812, in reset
self._benchmark_in_use_proto.uri = str(self._benchmark_in_use.uri)
AttributeError: 'generator' object has no attribute 'uri'
Strange, when I reverted it to |
Tried to copy and paste the
example_loop_unrolling
from the CompilerGym repo to a standalone repo, and get it to by just following 2 steps:pip install compiler_gym
python example_unrolling_service/example_without_bazel.py
Here are some caveats/discussions:
facebookresearch
GitHub account?FIXME
) from the top-of-trunk in CompilerGymdevelopment
branch to instead be compatible with the latest release of CompilerGym uploaded to PyPillvm.clang_path()
didn't work so had to just use"clang"
for now. But maybe that's OK as we expect people to use their own clang?Closes !facebookresearch/CompilerGym#532