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

Add a standalone binary to compute LLMV observations #405

Merged

Conversation

ChrisCummins
Copy link
Contributor

This adds a new standalone compute_observation binary that takes an observation space name and a LLVM bitcode and computes an observation. There is a corresponding compiler_gym.envs.llvm.compute_observation() python function to run the binary.

It is intended for use cases where you want to compute an observation without the overhead of initializing a full environment.

Example usage:

>>> env = compiler_gym.make("llvm-v0")
>>> space = env.observation.spaces["Ir"]
>>> bitcode = Path("bitcode.bc")
>>> observation = llvm.compute_observation(space, bitcode, timeout=30)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 17, 2021
@ChrisCummins ChrisCummins added this to the v0.1.11 milestone Sep 17, 2021
@ChrisCummins ChrisCummins added the LLVM LLVM-specific environment issue label Sep 17, 2021
@ChrisCummins ChrisCummins merged commit e33776d into facebookresearch:development Sep 17, 2021
@ChrisCummins ChrisCummins deleted the llvm-observation-bin branch September 17, 2021 18:25
This was referenced Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. LLVM LLVM-specific environment issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants