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

Compiler client and server #1249

Draft
wants to merge 432 commits into
base: master
Choose a base branch
from
Draft

Compiler client and server #1249

wants to merge 432 commits into from

Conversation

Jakobeha
Copy link
Collaborator

@Jakobeha Jakobeha commented Aug 30, 2023

This is the current branch with the compiler server.

Typical usage is to run one instance of Ř (the server) with PIR_SERVER_ADDR=tcp://*:$PORT and another (the client) with PIR_CLIENT_ADDR=tcp://localhost:$PORT. The client will have a REPL (or you can give it args like -f $FILE), and the server will wait for requests and compile them.

You can read more flags at documentation/compiler-server.md and there are extra flags in documentation/debugging.md.


There are 2 new external dependencies, xxhash and zeromq. There are some small inline dependencies in utils. The sanitize gitlab test now downloads and installs a new version of LLVM (16) because the old one can't link xxhash for some reason, which requires libtinfo5 (via apt) and zlib (needs to be downloaded from the site and built from source).

There's also quite a lot of extra stuff. There's a new serialization API which is more flexible and uses ByteBuffers / unordered_map instead of R objects. There's also the Ř object graph printer, which is controlled by PIR_PRINT_INTERNED_RIR_OBJECTS and PIR_PRINT_INTERNED_RIR_OBJECTS_FREQUENCY (this is where the massive code insertion count is, because it's counting the lines added by cytoscape.

On the other hand, almost all of the changes should only be applied if you use one of the new flags: PIR_SERVER_ADDR/PIR_CLIENT_ADDR but also RIR_SERIALIZE_CHAOS, PIR_DEBUG_SERIALIZE_LLVM, and PIR_PRINT_INTERNED_RIR_OBJECTS. Running Ř without these flags allegedly shouldn't have any semantic changes or performance regressions.

I did make a few changes like replacing some LENGTH/XLENGTH with RAW_LENGTH so that the R write barrier works, but these functions should be the same unless you compile custom-r with --enable-strict-barrier (TESTING_WRITE_BARRIER).

… with a different pc than code? Otherwise, we disable OSR in the compiler client when not in dry-run
…t looks like the pir.check assertions aren't true (don't know if this is intended...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant