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 do I use the binary that I built from the CompilerGym source code? #807

Open
chendian2023 opened this issue Jun 8, 2023 · 2 comments
Labels
Question Further information is requested

Comments

@chendian2023
Copy link

chendian2023 commented Jun 8, 2023

❓ Questions and Help

I have built CompilerGym from source on my x86 Linux platform, and now I have directories named bin, include, lib, and share. However, I am unsure how to use these directories. Are there any instructions available? Currently, I am only able to use CompilerGym by importing it after installing it with "pip3 install compiler_gym==0.2.5" .

In other words , how can I generate *.whl such as "compiler_gym-0.2.5-py3-none-manylinux2014_x86_64.whl " after building form source using CMake ,Ninja , ninja install ?

Thanks for your reply .

Additional Context

I was able to successfully build CompilerGym from source after making some modifications to the package versions in the original CMakeLists file.
After numerous attempts, I have finally succeeded in compiling CompilerGym from source code. However, I am now unsure how to use it.

@chendian2023 chendian2023 added the Question Further information is requested label Jun 8, 2023
@chendian2023 chendian2023 changed the title How to use my binary what I had built from source ? How do I use the binary that I built from the CompilerGym source code? Jun 8, 2023
@chendian2023
Copy link
Author

chendian2023 commented Jun 8, 2023

ls bin/
acountry ahost compute_autophase compute_observation llvm-extract-one
adig compiler_gym-llvm-service compute_ir_instruction_count compute_programl PrintInstCountFeatureNames

ls lib/
cmake libglog.a libgmock_main.a libgtest_main.a libz.a libz.so.1 pkgconfig
libcares.a libgmock.a libgtest.a libre2.a libz.so libz.so.1.2.13

ls include/
ares_build.h ares.h ares_version.h gmock grpc++ gtest re2 zlib.h
ares_dns.h ares_rules.h glog grpc grpcpp nlohmann zconf.h

ls share/
grpc man pkgconfig

@ChrisCummins
Copy link
Contributor

Hi @chendian2023, once you have built with cmake you should have a *.whl file that can be installed using:

pip install <path to build directory>/py_pkg/dist/compiler_gym*.whl --force-reinstall

See INSTALL.md for details.

I was able to successfully build CompilerGym from source after making some modifications to the package versions in the original CMakeLists file.

Patches welcome! :) What versions needed changing?

Cheers,
Chris

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

No branches or pull requests

2 participants