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

gRPC refactoring of actions and observations #531

Merged

Conversation

sogartar
Copy link

@sogartar sogartar commented Dec 28, 2021

Fixes #526

This is a draft of the protobuf message definitions. It makes actions and observations be more like the CompilerGym Python environment interface.

@ChrisCummins, could you take a look and see if this structure is appropriate. After I address your remarks I will proceed to refactor the existing environments to use the new structure.

@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 Dec 28, 2021
Copy link
Contributor

@ChrisCummins ChrisCummins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good @sogartar! I'll keep the design discussion on this thread, so here's just my comments on the code. A few random thoughts:

  • Everything should live in one namespace. IMO ActionSpace is easier to read than spaces.Action, and removes the risk of aliasing headaches when you import multiple headers in C++ / packages in Python.

  • It took me a while to grok your replacements for the vector types (e.g. DoubleList). I think your new proposal supports both fixed size boxes (Space.double_box) and variable length arrays (Space.double_sequence), which is nice, but it isn't super clear to me. Could you add some more comments? Is there a use case for variable-length arrays?

  • I'm not sure about the file splits. It looks to me like basic.proto and event.proto could be merged into a single tensor.proto, and spaces.proto contains range types which are not spaces.

Cheers,
Chris

compiler_gym/service/proto/spaces/spaces.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/spaces/spaces.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/observation.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/event.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/event.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/spaces/spaces.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/spaces/spaces.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/compiler_gym_service.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/basic.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/event.proto Outdated Show resolved Hide resolved
@sogartar
Copy link
Author

sogartar commented Dec 29, 2021

@ChrisCummins, thanks for the quick reply.

I merged all proto files into a single one as was before.

  • It took me a while to grok your replacements for the vector types (e.g. DoubleList). I think your new proposal supports both fixed size boxes (Space.double_box) and variable length arrays (Space.double_sequence), which is nice, but it isn't super clear to me. Could you add some more comments? Is there a use case for variable-length arrays?

I added a comment about that.

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2022

Codecov Report

Merging #531 (079fe95) into development (8611c25) will increase coverage by 0.28%.
The diff coverage is 95.81%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #531      +/-   ##
===============================================
+ Coverage        87.49%   87.77%   +0.28%     
===============================================
  Files              113      114       +1     
  Lines             6411     6601     +190     
===============================================
+ Hits              5609     5794     +185     
- Misses             802      807       +5     
Impacted Files Coverage Δ
compiler_gym/service/proto/__init__.py 100.00% <ø> (ø)
compiler_gym/envs/compiler_env.py 89.37% <50.00%> (-0.11%) ⬇️
compiler_gym/spaces/sequence.py 92.30% <77.77%> (-4.76%) ⬇️
...loop_tool/service/loop_tool_compilation_session.py 89.79% <83.33%> (+1.20%) ⬆️
compiler_gym/envs/gcc/service/gcc_service.py 97.05% <92.85%> (-0.03%) ⬇️
compiler_gym/spaces/common.py 93.75% <93.75%> (ø)
compiler_gym/service/proto/py_converters.py 97.89% <97.82%> (-2.11%) ⬇️
compiler_gym/envs/llvm/compute_observation.py 89.58% <100.00%> (ø)
compiler_gym/service/compilation_session.py 86.36% <100.00%> (+2.15%) ⬆️
...mpiler_gym/service/runtime/compiler_gym_service.py 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8611c25...079fe95. Read the comment docs.

@sogartar
Copy link
Author

@ChrisCummins, this PR is ready for review. Tests, benchmarks and examples should pass.

Unresolved issues:

prototool with protoc < 15 does not recognize a warning coming from protoc regarding optional see this issue.
With protoc >= 15 it would remove the optional.
I think the best approach is to stop using the prototool abandonware and move to buf. Unfortunately, it does not have a formatter yet.

The dispatching based on type_id when converting observations and actions is not ready yet. I was able to make this PR without it. I will do it in another PR. This one is quite big already.

@ChrisCummins ChrisCummins added this to In progress in CompilerGym roadmap Jan 19, 2022
@ChrisCummins
Copy link
Contributor

Hi @sogartar, great work as always, thank you!

It's interesting to see that the optional keyword has been added to proto3. I thought that "all fields are optional" was a key design difference between 2/3.

IIUC, you're using optional fields only for the optional upper and lower bounds in range types. If that is the case, I think the best approach would just be to work around the limitation since it's easy to do by just replacing the optional <type> fields with a nested wrapper message:

// These wrapper messages enable the `<Type>Range` ranges to
// have optional upper and lower bounds.

message OptionalBoolean {
  bool value = 1;
}

message OptionalDouble {
  double value = 1;
}

// ... Int64, Float

You can then use e.g. message.HasField("min") to check for the presence of these nested messages and message.min.value to get the value. I guess optional would be faster, but I don't think there is any range-parsing code in hot paths.

I will try and work through the rest of the PR in the next couple of days.

Cheers,
Chris

@sogartar
Copy link
Author

Wrapping the optional values in a Message wouldn't be such a big deal. It just creates clutter, but in general I don't think shortcomings of the linter and formatter should drive design decisions.

@ChrisCummins
Copy link
Contributor

I agree that the extra boilerplate is clutter, I just figured it'd be less work than trying to find a new linter/formatter :)

Cheers,
Chris

@sogartar
Copy link
Author

@ChrisCummins, did you get a chance to review this PR?

@ChrisCummins
Copy link
Contributor

Sorry @sogartar, this slipped through the net! Thanks for the nudge. I will take a look within the next 24 hours.

Cheers,
Chris

Copy link
Contributor

@ChrisCummins ChrisCummins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sogartar,

First, sorry for the delay in reviewing this. My schedule is mostly back to normal now so I should be more regular with responding to PRs.

Overall, I really like the direction you have taken and I think that this PR is a big improvement over the existing approach. The only merge-blocking thing I see is the need to update the CI/pre-commit configuration so that the proto linter works, or working around it by declaring 'Optional' type wrappers as discussed above.

A bunch of tiny nitpicks left inline.

I wonder if moving the name field from Space into ActionSpace.name and ObservationSpace.name would be more clear as to what the name is used for?

This is great work @sogartar, I look forward to merging it, thank you.

Cheers,
Chris

compiler_gym/envs/gcc/service/gcc_service.py Outdated Show resolved Hide resolved
compiler_gym/service/proto/compiler_gym_service.proto Outdated Show resolved Hide resolved
switch (space) {
case LlvmObservationSpace::IR: {
// Serialize the LLVM module to an IR string.
std::string ir;
llvm::raw_string_ostream rso(ir);
benchmark.module().print(rso, /*AAW=*/nullptr);
rso.flush();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks!

compiler_gym/service/proto/compiler_gym_service.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/compiler_gym_service.proto Outdated Show resolved Hide resolved
compiler_gym/service/proto/py_converters.py Outdated Show resolved Hide resolved
compiler_gym/service/proto/py_converters.py Show resolved Hide resolved
@@ -44,4 +44,5 @@ ExternalProject_Add_Step(programl build_programl
@labm8//labm8/cpp:stringpiece
DEPENDEES update
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/programl/src/programl"
USES_TERMINAL TRUE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, what does this do?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will redirect the terminal output before the command has finished giving you a chance to see what is going on immediately instead of spitting it out at the end. Without this some of the long-running commands don't output anything leaving you wondering if the build is stuck.

tests/service/proto/py_converters_test.py Outdated Show resolved Hide resolved
@ChrisCummins
Copy link
Contributor

ChrisCummins commented Feb 2, 2022

BTW, I ran the micro-benchmark suite on my local machine to see what, if any, impact on performance this PR has. They're not very scientific and I expect there's a fair amount of noise in the measurements, but I thought I'd share the raw data with you here in case you're interested. For each benchmark, the results show the current development head (dev) against this PR (pr531):

The only thing that surprised me was a large regression in the "fast benchmark, fast action" step benchmark for LLVM (test_step[llvm;fast-benchmark;fast-action]). Not sure what is going on there

------------------------------------------------- benchmark 'test_fork[llvm;fast-benchmark]': 2 tests -------------------------------------------------
Name (time in ms)                             Min            Median               Max              Mean            StdDev                 OPS          
-------------------------------------------------------------------------------------------------------------------------------------------------------
test_fork[llvm;fast-benchmark] (dev)       5.3612 (1.04)     5.8325 (1.00)     9.8847 (1.02)     5.9695 (1.02)     0.8528 (1.0)      167.5176 (0.98)   
test_fork[llvm;fast-benchmark] (pr531)     5.1487 (1.0)      5.8195 (1.0)      9.6968 (1.0)      5.8569 (1.0)      0.9007 (1.06)     170.7395 (1.0)    
-------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------- benchmark 'test_fork[llvm;slow-benchmark]': 2 tests ---------------------------------------------------
Name (time in ms)                              Min             Median                 Max               Mean            StdDev                OPS          
-----------------------------------------------------------------------------------------------------------------------------------------------------------
test_fork[llvm;slow-benchmark] (dev)       50.8527 (1.0)      59.1414 (1.00)     108.8858 (1.06)     60.6275 (1.01)     7.4096 (1.01)     16.4942 (0.99)   
test_fork[llvm;slow-benchmark] (pr531)     50.8556 (1.00)     58.9774 (1.0)      102.8974 (1.0)      60.3168 (1.0)      7.3302 (1.0)      16.5791 (1.0)    
-----------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------- benchmark 'test_make_local[dummy-cc]': 2 tests ----------------------------------------------------
Name (time in ms)                          Min              Median                 Max                Mean            StdDev               OPS          
--------------------------------------------------------------------------------------------------------------------------------------------------------
test_make_local[dummy-cc] (dev)       106.9122 (1.00)     108.1565 (1.00)     110.4549 (1.01)     108.1628 (1.00)     0.6247 (1.0)      9.2453 (1.00)   
test_make_local[dummy-cc] (pr531)     106.5613 (1.0)      107.9170 (1.0)      109.2512 (1.0)      107.8886 (1.0)      0.6352 (1.02)     9.2688 (1.0)    
--------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------- benchmark 'test_make_local[dummy-py]': 2 tests ----------------------------------------------------
Name (time in ms)                          Min              Median                 Max                Mean            StdDev               OPS          
--------------------------------------------------------------------------------------------------------------------------------------------------------
test_make_local[dummy-py] (dev)       433.8674 (1.00)     434.8021 (1.00)     485.3962 (1.11)     435.8636 (1.00)     7.0556 (13.58)    2.2943 (1.00)   
test_make_local[dummy-py] (pr531)     433.6690 (1.0)      434.6918 (1.0)      436.1945 (1.0)      434.6879 (1.0)      0.5197 (1.0)      2.3005 (1.0)    
--------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------- benchmark 'test_make_local[llvm]': 2 tests ----------------------------------------------------
Name (time in ms)                      Min              Median                 Max                Mean            StdDev               OPS          
----------------------------------------------------------------------------------------------------------------------------------------------------
test_make_local[llvm] (dev)       108.2366 (1.00)     111.1802 (1.00)     148.7467 (1.0)      111.6621 (1.00)     4.0715 (1.0)      8.9556 (1.00)   
test_make_local[llvm] (pr531)     107.8960 (1.0)      110.8217 (1.0)      149.8135 (1.01)     111.3542 (1.0)      4.2114 (1.03)     8.9804 (1.0)    
----------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------- benchmark 'test_make_service[dummy-cc]': 2 tests ----------------------------------------------------
Name (time in ms)                            Min              Median                 Max                Mean            StdDev               OPS          
----------------------------------------------------------------------------------------------------------------------------------------------------------
test_make_service[dummy-cc] (dev)       200.8979 (1.0)      201.9138 (1.00)     202.1774 (1.0)      201.6936 (1.0)      0.4154 (1.06)     4.9580 (1.0)    
test_make_service[dummy-cc] (pr531)     200.9789 (1.00)     201.8568 (1.0)      202.2755 (1.00)     201.7132 (1.00)     0.3930 (1.0)      4.9575 (1.00)   
----------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------- benchmark 'test_make_service[dummy-py]': 2 tests ----------------------------------------------------
Name (time in ms)                            Min              Median                 Max                Mean            StdDev               OPS          
----------------------------------------------------------------------------------------------------------------------------------------------------------
test_make_service[dummy-py] (dev)       200.8203 (1.0)      201.8561 (1.0)      202.3979 (1.0)      201.7038 (1.0)      0.4220 (1.25)     4.9578 (1.0)    
test_make_service[dummy-py] (pr531)     200.9735 (1.00)     201.9089 (1.00)     202.5069 (1.00)     201.8239 (1.00)     0.3381 (1.0)      4.9548 (1.00)   
----------------------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------- benchmark 'test_make_service[llvm]': 2 tests ----------------------------------------------------
Name (time in ms)                        Min              Median                 Max                Mean            StdDev               OPS          
------------------------------------------------------------------------------------------------------------------------------------------------------
test_make_service[llvm] (dev)       201.7215 (1.00)     201.9982 (1.00)     205.2025 (1.01)     202.1527 (1.00)     0.5745 (1.25)     4.9468 (1.00)   
test_make_service[llvm] (pr531)     201.0258 (1.0)      201.9972 (1.0)      204.1756 (1.0)      202.0922 (1.0)      0.4581 (1.0)      4.9482 (1.0)    
------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[dummy-cc]': 2 tests -------------------------------------------------------
Name (time in us)                           Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
---------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[dummy-cc] (dev)       104.1044 (1.02)     110.4795 (1.0)      154.0897 (1.0)      112.3550 (1.0)      6.7914 (1.02)           8.9004 (1.0)    
test_observation[dummy-cc] (pr531)     101.7182 (1.0)      115.2305 (1.04)     160.9763 (1.04)     115.2270 (1.03)     6.6850 (1.0)            8.6785 (0.98)   
---------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[dummy-py]': 2 tests --------------------------------------------------------
Name (time in us)                           Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
----------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[dummy-py] (dev)       357.5317 (1.05)     480.0946 (1.0)      576.8501 (1.0)      473.5699 (1.0)      58.5807 (1.0)            2.1116 (1.0)    
test_observation[dummy-py] (pr531)     341.1274 (1.0)      508.2634 (1.06)     578.7178 (1.00)     478.5608 (1.01)     62.7312 (1.07)           2.0896 (0.99)   
----------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[llvm;AutophaseDict]': 2 tests -------------------------------------------------------
Name (time in us)                                     Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;AutophaseDict] (dev)       133.7912 (1.0)      146.7535 (1.0)      159.9993 (1.0)      145.3765 (1.0)      5.0183 (1.87)           6.8787 (1.0)    
test_observation[llvm;AutophaseDict] (pr531)     139.5808 (1.04)     155.3938 (1.06)     160.6253 (1.00)     154.8793 (1.07)     2.6871 (1.0)            6.4566 (0.94)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[llvm;Autophase]': 2 tests --------------------------------------------------------
Name (time in us)                                 Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Autophase] (dev)       135.1588 (1.0)      197.7563 (1.32)     235.9358 (1.46)     189.4409 (1.27)     27.0224 (6.83)           5.2787 (0.79)   
test_observation[llvm;Autophase] (pr531)     138.0801 (1.02)     149.7101 (1.0)      161.4307 (1.0)      148.8341 (1.0)       3.9591 (1.0)            6.7189 (1.0)    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------- benchmark 'test_observation[llvm;BitcodeFile]': 2 tests --------------------------------------------------------
Name (time in us)                                   Min              Median                 Max                Mean              StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;BitcodeFile] (dev)       466.1965 (1.17)     471.5317 (1.0)      867.4909 (1.0)      585.7629 (1.0)      142.4294 (1.03)           1.7072 (1.0)    
test_observation[llvm;BitcodeFile] (pr531)     399.3641 (1.0)      643.9006 (1.37)     890.4423 (1.03)     636.5858 (1.09)     138.0507 (1.0)            1.5709 (0.92)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[llvm;Bitcode]': 2 tests --------------------------------------------------------
Name (time in us)                               Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Bitcode] (dev)       759.1346 (1.07)     807.6788 (1.03)     853.6068 (1.02)     801.9442 (1.02)     24.1015 (1.06)           1.2470 (0.98)   
test_observation[llvm;Bitcode] (pr531)     708.4128 (1.0)      780.9599 (1.0)      838.5698 (1.0)      789.4986 (1.0)      22.6618 (1.0)            1.2666 (1.0)    
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------ benchmark 'test_observation[llvm;Buildtime]': 2 tests -------------------------------------------------------
Name (time in us)                                Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Buildtime] (dev)       99.2324 (1.02)     108.0137 (1.0)      116.4252 (1.0)      108.6252 (1.0)      4.5761 (1.0)            9.2060 (1.0)    
test_observation[llvm;Buildtime] (pr531)     96.9970 (1.0)      117.0963 (1.08)     127.8468 (1.10)     117.4679 (1.08)     5.1571 (1.13)           8.5130 (0.92)   
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[llvm;CpuInfo]': 2 tests -------------------------------------------------------
Name (time in us)                               Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;CpuInfo] (dev)       103.9095 (1.0)      112.3361 (1.0)      116.6339 (1.0)      112.8326 (1.0)      2.9442 (1.0)            8.8627 (1.0)    
test_observation[llvm;CpuInfo] (pr531)     112.4492 (1.08)     127.5206 (1.14)     138.7917 (1.19)     126.3714 (1.12)     4.2987 (1.46)           7.9132 (0.89)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------- benchmark 'test_observation[llvm;Inst2vecEmbeddingIndices]': 2 tests --------------------------------------------------
Name (time in ms)                                               Min             Median                Max               Mean            StdDev                OPS          
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Inst2vecEmbeddingIndices] (dev)       18.5348 (1.02)     18.8023 (1.02)     33.8285 (1.54)     19.1505 (1.02)     2.0781 (2.58)     52.2181 (0.98)   
test_observation[llvm;Inst2vecEmbeddingIndices] (pr531)     18.2050 (1.0)      18.5086 (1.0)      21.9148 (1.0)      18.7898 (1.0)      0.8058 (1.0)      53.2204 (1.0)    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------- benchmark 'test_observation[llvm;Inst2vecPreprocessedText]': 2 tests --------------------------------------------------
Name (time in ms)                                               Min             Median                Max               Mean            StdDev                OPS          
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Inst2vecPreprocessedText] (dev)       18.2095 (1.00)     18.3691 (1.00)     21.6759 (1.0)      18.6660 (1.01)     0.8007 (1.0)      53.5734 (0.99)   
test_observation[llvm;Inst2vecPreprocessedText] (pr531)     18.1274 (1.0)      18.3077 (1.0)      32.1372 (1.48)     18.5056 (1.0)      1.3920 (1.74)     54.0376 (1.0)    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------- benchmark 'test_observation[llvm;Inst2vec]': 2 tests --------------------------------------------------
Name (time in ms)                               Min             Median                Max               Mean            StdDev                OPS          
-----------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Inst2vec] (dev)       19.1110 (1.02)     19.6098 (1.03)     47.7885 (1.01)     20.2494 (1.04)     4.0187 (1.42)     49.3842 (0.96)   
test_observation[llvm;Inst2vec] (pr531)     18.7778 (1.0)      19.0597 (1.0)      47.3753 (1.0)      19.4637 (1.0)      2.8337 (1.0)      51.3777 (1.0)    
-----------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[llvm;InstCountDict]': 2 tests -------------------------------------------------------
Name (time in us)                                     Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;InstCountDict] (dev)       130.1369 (1.0)      144.9270 (1.0)      154.6123 (1.0)      144.2141 (1.0)      3.2096 (1.0)            6.9341 (1.0)    
test_observation[llvm;InstCountDict] (pr531)     148.6755 (1.14)     156.6906 (1.08)     162.6487 (1.05)     155.7019 (1.08)     3.4555 (1.08)           6.4225 (0.93)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[llvm;InstCountNormDict]': 2 tests -------------------------------------------------------
Name (time in us)                                         Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;InstCountNormDict] (dev)       150.2826 (1.01)     158.1618 (1.0)      169.6872 (1.0)      158.0551 (1.0)      3.0879 (1.0)            6.3269 (1.0)    
test_observation[llvm;InstCountNormDict] (pr531)     148.9507 (1.0)      166.5322 (1.05)     233.7470 (1.38)     165.7413 (1.05)     8.1184 (2.63)           6.0335 (0.95)   
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[llvm;InstCountNorm]': 2 tests -------------------------------------------------------
Name (time in us)                                     Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;InstCountNorm] (dev)       126.6525 (1.0)      141.5311 (1.0)      152.3527 (1.0)      141.7066 (1.0)      4.6937 (1.48)           7.0568 (1.0)    
test_observation[llvm;InstCountNorm] (pr531)     139.7474 (1.10)     149.1182 (1.05)     156.5884 (1.03)     149.0829 (1.05)     3.1709 (1.0)            6.7077 (0.95)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_observation[llvm;InstCount]': 2 tests -------------------------------------------------------
Name (time in us)                                 Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;InstCount] (dev)       120.4946 (1.0)      128.9671 (1.0)      141.8949 (1.0)      129.4427 (1.0)      4.2123 (1.04)           7.7254 (1.0)    
test_observation[llvm;InstCount] (pr531)     130.0872 (1.08)     138.3984 (1.07)     146.0721 (1.03)     138.4007 (1.07)     4.0483 (1.0)            7.2254 (0.94)   
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------ benchmark 'test_observation[llvm;IrInstructionCountO0]': 2 tests -----------------------------------------------------
Name (time in us)                                           Min             Median                 Max               Mean            StdDev            OPS (Kops/s)          
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;IrInstructionCountO0] (dev)       86.0273 (1.08)     93.7554 (1.0)      121.7164 (1.16)     95.0087 (1.0)      4.3749 (1.0)           10.5253 (1.0)    
test_observation[llvm;IrInstructionCountO0] (pr531)     79.8362 (1.0)      96.0336 (1.02)     104.8189 (1.0)      96.5033 (1.02)     4.5899 (1.05)          10.3623 (0.98)   
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------ benchmark 'test_observation[llvm;IrInstructionCountO3]': 2 tests -----------------------------------------------------
Name (time in us)                                           Min             Median                 Max               Mean            StdDev            OPS (Kops/s)          
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;IrInstructionCountO3] (dev)       89.0659 (1.00)     97.9113 (1.01)     106.9428 (1.05)     95.5966 (1.0)      3.8730 (1.26)          10.4606 (1.0)    
test_observation[llvm;IrInstructionCountO3] (pr531)     88.9732 (1.0)      96.7563 (1.0)      101.9734 (1.0)      96.7637 (1.01)     3.0778 (1.0)           10.3344 (0.99)   
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------ benchmark 'test_observation[llvm;IrInstructionCountOz]': 2 tests -----------------------------------------------------
Name (time in us)                                           Min             Median                 Max               Mean            StdDev            OPS (Kops/s)          
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;IrInstructionCountOz] (dev)       88.5681 (1.03)     96.4619 (1.0)      106.3473 (1.0)      96.6238 (1.0)      3.8731 (1.0)           10.3494 (1.0)    
test_observation[llvm;IrInstructionCountOz] (pr531)     86.0914 (1.0)      97.6358 (1.01)     135.1221 (1.27)     97.7699 (1.01)     5.3654 (1.39)          10.2281 (0.99)   
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------- benchmark 'test_observation[llvm;IrInstructionCount]': 2 tests -------------------------------------------------------
Name (time in us)                                          Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;IrInstructionCount] (dev)       101.4046 (1.0)      113.1973 (1.0)      161.1210 (1.32)     116.3425 (1.01)     12.7679 (4.65)           8.5953 (0.99)   
test_observation[llvm;IrInstructionCount] (pr531)     106.0993 (1.05)     115.2037 (1.02)     121.7029 (1.0)      115.2881 (1.0)       2.7478 (1.0)            8.6739 (1.0)    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------- benchmark 'test_observation[llvm;IrSha1]': 2 tests -------------------------------------------------------
Name (time in us)                              Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;IrSha1] (dev)       776.6030 (1.37)     805.5258 (1.01)     881.0640 (1.01)     805.0141 (1.01)     21.3772 (1.0)            1.2422 (0.99)   
test_observation[llvm;IrSha1] (pr531)     567.8964 (1.0)      796.1390 (1.0)      868.2593 (1.0)      797.8481 (1.0)      35.0802 (1.64)           1.2534 (1.0)    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------- benchmark 'test_observation[llvm;Ir]': 2 tests -------------------------------------------------------
Name (time in us)                          Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
---------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Ir] (dev)       556.5073 (1.11)     623.1837 (1.00)     659.5920 (1.0)      618.1509 (1.0)      21.1915 (1.0)            1.6177 (1.0)    
test_observation[llvm;Ir] (pr531)     503.2965 (1.0)      621.8391 (1.0)      707.3005 (1.07)     628.9377 (1.02)     28.8452 (1.36)           1.5900 (0.98)   
---------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------- benchmark 'test_observation[llvm;IsBuildable]': 2 tests ------------------------------------------------------
Name (time in us)                                  Min             Median                 Max               Mean            StdDev            OPS (Kops/s)          
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;IsBuildable] (dev)       89.9744 (1.08)     98.2527 (1.01)     148.6544 (1.13)     97.7974 (1.01)     7.5198 (1.49)          10.2252 (0.99)   
test_observation[llvm;IsBuildable] (pr531)     83.5506 (1.0)      96.9745 (1.0)      131.9393 (1.0)      96.6070 (1.0)      5.0600 (1.0)           10.3512 (1.0)    
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------ benchmark 'test_observation[llvm;IsRunnable]': 2 tests -----------------------------------------------------
Name (time in us)                                 Min             Median                 Max               Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;IsRunnable] (dev)       87.9623 (1.01)     93.3071 (1.0)      102.9414 (1.0)      94.1682 (1.0)      3.5859 (1.0)           10.6193 (1.0)    
test_observation[llvm;IsRunnable] (pr531)     87.5230 (1.0)      99.6176 (1.07)     105.9596 (1.03)     97.7914 (1.04)     3.8533 (1.07)          10.2259 (0.96)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------- benchmark 'test_observation[llvm;ObjectTextSizeBytes]': 2 tests --------------------------------------------------
Name (time in ms)                                         Min            Median                Max              Mean            StdDev                 OPS          
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;ObjectTextSizeBytes] (dev)       8.8820 (1.0)      9.2164 (1.0)      10.0411 (1.01)     9.2464 (1.0)      0.2023 (1.20)     108.1503 (1.0)    
test_observation[llvm;ObjectTextSizeBytes] (pr531)     8.9853 (1.01)     9.2829 (1.01)      9.9825 (1.0)      9.3234 (1.01)     0.1692 (1.0)      107.2569 (0.99)   
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------ benchmark 'test_observation[llvm;ObjectTextSizeO0]': 2 tests -----------------------------------------------------
Name (time in us)                                       Min             Median                 Max               Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;ObjectTextSizeO0] (dev)       82.2993 (1.0)      93.3427 (1.0)      104.8211 (1.04)     92.8706 (1.0)      4.1329 (1.21)          10.7677 (1.0)    
test_observation[llvm;ObjectTextSizeO0] (pr531)     85.4953 (1.04)     98.3066 (1.05)     100.9278 (1.0)      96.6539 (1.04)     3.4182 (1.0)           10.3462 (0.96)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------ benchmark 'test_observation[llvm;ObjectTextSizeO3]': 2 tests -----------------------------------------------------
Name (time in us)                                       Min             Median                 Max               Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;ObjectTextSizeO3] (dev)       82.3947 (1.0)      94.1036 (1.0)       99.1237 (1.0)      92.9174 (1.0)      4.0944 (1.0)           10.7622 (1.0)    
test_observation[llvm;ObjectTextSizeO3] (pr531)     86.0391 (1.04)     98.9545 (1.05)     101.4875 (1.02)     96.6956 (1.04)     4.1873 (1.02)          10.3417 (0.96)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------ benchmark 'test_observation[llvm;ObjectTextSizeOz]': 2 tests -----------------------------------------------------
Name (time in us)                                       Min             Median                 Max               Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;ObjectTextSizeOz] (dev)       85.0358 (1.0)      95.0705 (1.0)       98.8526 (1.0)      93.7110 (1.0)      3.3326 (1.0)           10.6711 (1.0)    
test_observation[llvm;ObjectTextSizeOz] (pr531)     85.6021 (1.01)     98.6780 (1.04)     102.2564 (1.03)     96.6867 (1.03)     4.3831 (1.32)          10.3427 (0.97)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------- benchmark 'test_observation[llvm;ProgramlJson]': 2 tests --------------------------------------------------
Name (time in ms)                                   Min             Median                Max               Mean            StdDev                OPS          
---------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;ProgramlJson] (dev)       24.0717 (1.0)      37.8852 (1.05)     59.0815 (1.42)     37.8911 (1.04)     5.2302 (2.20)     26.3914 (0.96)   
test_observation[llvm;ProgramlJson] (pr531)     29.4115 (1.22)     36.0222 (1.0)      41.6277 (1.0)      36.3016 (1.0)      2.3747 (1.0)      27.5470 (1.0)    
---------------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------- benchmark 'test_observation[llvm;Programl]': 2 tests ---------------------------------------------------
Name (time in ms)                               Min             Median                Max               Mean             StdDev                OPS          
------------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Programl] (dev)       28.1489 (1.04)     49.2024 (1.12)     89.0312 (1.31)     53.1403 (1.10)     13.7240 (1.39)     18.8181 (0.91)   
test_observation[llvm;Programl] (pr531)     26.9823 (1.0)      43.7887 (1.0)      68.0859 (1.0)      48.0932 (1.0)       9.8433 (1.0)      20.7930 (1.0)    
------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------- benchmark 'test_observation[llvm;Runtime]': 2 tests ---------------------------------------------------
Name (time in ms)                              Min             Median                Max               Mean            StdDev                OPS          
----------------------------------------------------------------------------------------------------------------------------------------------------------
test_observation[llvm;Runtime] (dev)       42.6056 (1.0)      48.2666 (1.0)      59.7719 (1.0)      48.6675 (1.0)      3.7118 (1.0)      20.5476 (1.0)    
test_observation[llvm;Runtime] (pr531)     48.6547 (1.14)     53.6341 (1.11)     63.2418 (1.06)     54.1322 (1.11)     3.7206 (1.00)     18.4733 (0.90)   
----------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_reset[dummy-cc]': 2 tests --------------------------------------------------------
Name (time in us)                     Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
----------------------------------------------------------------------------------------------------------------------------------------------------------
test_reset[dummy-cc] (dev)       181.9820 (1.12)     212.3184 (1.19)     351.6701 (1.79)     213.1374 (1.20)     23.1636 (3.40)           4.6918 (0.83)   
test_reset[dummy-cc] (pr531)     162.1925 (1.0)      178.0998 (1.0)      196.1723 (1.0)      176.8786 (1.0)       6.8066 (1.0)            5.6536 (1.0)    
----------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------- benchmark 'test_reset[dummy-py]': 2 tests ---------------------------------------------------------
Name (time in us)                     Min              Median                   Max                Mean             StdDev            OPS (Kops/s)          
------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reset[dummy-py] (dev)       712.2144 (1.15)     856.9236 (1.07)     1,074.8641 (1.10)     876.5613 (1.08)     86.4050 (1.20)           1.1408 (0.92)   
test_reset[dummy-py] (pr531)     616.8264 (1.0)      799.8676 (1.0)        977.4837 (1.0)      807.9791 (1.0)      72.1687 (1.0)            1.2377 (1.0)    
------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------- benchmark 'test_reset[llvm;fast-benchmark]': 2 tests -------------------------------------------------
Name (time in ms)                              Min            Median               Max              Mean            StdDev                 OPS          
--------------------------------------------------------------------------------------------------------------------------------------------------------
test_reset[llvm;fast-benchmark] (dev)       1.0865 (1.37)     1.1119 (1.16)     2.1813 (1.36)     1.2997 (1.27)     0.3426 (1.64)     769.3827 (0.79)   
test_reset[llvm;fast-benchmark] (pr531)     0.7937 (1.0)      0.9601 (1.0)      1.6043 (1.0)      1.0238 (1.0)      0.2094 (1.0)      976.7885 (1.0)    
--------------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------------------------- benchmark 'test_reset[llvm;slow-benchmark]': 2 tests --------------------------------------------------
Name (time in ms)                               Min             Median                Max               Mean            StdDev                OPS          
-----------------------------------------------------------------------------------------------------------------------------------------------------------
test_reset[llvm;slow-benchmark] (dev)       57.7051 (1.05)     63.8959 (1.02)     88.5318 (1.05)     65.1174 (1.00)     6.2948 (1.05)     15.3569 (1.00)   
test_reset[llvm;slow-benchmark] (pr531)     54.7140 (1.0)      62.9266 (1.0)      84.6799 (1.0)      64.9503 (1.0)      5.9732 (1.0)      15.3964 (1.0)    
-----------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_reward[dummy-cc]': 2 tests ------------------------------------------------------
Name (time in us)                     Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
---------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[dummy-cc] (dev)       97.6659 (1.0)      112.8154 (1.0)      123.6143 (1.0)      111.5124 (1.0)      4.3719 (1.0)            8.9676 (1.0)    
test_reward[dummy-cc] (pr531)     98.1128 (1.00)     117.3996 (1.04)     143.2594 (1.16)     114.7091 (1.03)     6.5154 (1.49)           8.7177 (0.97)   
---------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------- benchmark 'test_reward[dummy-py]': 2 tests -------------------------------------------------------
Name (time in us)                      Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
-----------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[dummy-py] (dev)       312.9685 (1.0)      441.3354 (1.0)      556.6677 (1.0)      436.3990 (1.0)      40.7635 (1.22)           2.2915 (1.0)    
test_reward[dummy-py] (pr531)     365.6052 (1.17)     470.4944 (1.07)     561.2743 (1.01)     476.6306 (1.09)     33.5475 (1.0)            2.0981 (0.92)   
-----------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_reward[llvm;IrInstructionCountNorm]': 2 tests --------------------------------------------------------
Name (time in us)                                         Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[llvm;IrInstructionCountNorm] (dev)        99.0288 (1.0)      113.0367 (1.0)      119.1223 (1.0)      111.9062 (1.0)       4.2850 (1.0)            8.9361 (1.0)    
test_reward[llvm;IrInstructionCountNorm] (pr531)     106.7794 (1.08)     118.8940 (1.05)     165.7310 (1.39)     122.5661 (1.10)     13.8745 (3.24)           8.1589 (0.91)   
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_reward[llvm;IrInstructionCountO3]': 2 tests -------------------------------------------------------
Name (time in us)                                       Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[llvm;IrInstructionCountO3] (dev)        99.7123 (1.0)      113.9637 (1.0)      118.8899 (1.0)      113.5659 (1.0)      3.6427 (1.0)            8.8055 (1.0)    
test_reward[llvm;IrInstructionCountO3] (pr531)     107.1877 (1.07)     118.9032 (1.04)     163.3282 (1.37)     117.9156 (1.04)     6.0942 (1.67)           8.4806 (0.96)   
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_reward[llvm;IrInstructionCountOz]': 2 tests --------------------------------------------------------
Name (time in us)                                       Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[llvm;IrInstructionCountOz] (dev)       100.0926 (1.0)      115.2447 (1.0)      192.3443 (1.10)     116.3295 (1.0)      11.4168 (1.43)           8.5963 (1.0)    
test_reward[llvm;IrInstructionCountOz] (pr531)     106.0417 (1.06)     119.0660 (1.03)     175.6299 (1.0)      119.3898 (1.03)      7.9601 (1.0)            8.3759 (0.97)   
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_reward[llvm;IrInstructionCount]': 2 tests --------------------------------------------------------
Name (time in us)                                     Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[llvm;IrInstructionCount] (dev)       100.7555 (1.0)      113.9201 (1.0)      117.0994 (1.0)      112.5624 (1.0)       3.9631 (1.0)            8.8840 (1.0)    
test_reward[llvm;IrInstructionCount] (pr531)     103.1117 (1.02)     117.6020 (1.03)     213.1863 (1.82)     125.9660 (1.12)     21.8553 (5.51)           7.9386 (0.89)   
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------- benchmark 'test_reward[llvm;ObjectTextSizeBytes]': 2 tests -------------------------------------------------
Name (time in ms)                                    Min            Median                Max              Mean            StdDev                 OPS          
---------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[llvm;ObjectTextSizeBytes] (dev)       8.9465 (1.0)      9.1621 (1.0)      10.2567 (1.05)     9.1860 (1.0)      0.1965 (1.38)     108.8614 (1.0)    
test_reward[llvm;ObjectTextSizeBytes] (pr531)     9.0018 (1.01)     9.2724 (1.01)      9.7287 (1.0)      9.2800 (1.01)     0.1428 (1.0)      107.7592 (0.99)   
---------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------- benchmark 'test_reward[llvm;ObjectTextSizeNorm]': 2 tests --------------------------------------------------
Name (time in ms)                                   Min            Median                Max              Mean            StdDev                 OPS          
--------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[llvm;ObjectTextSizeNorm] (dev)       8.8744 (1.0)      9.1434 (1.0)      10.4284 (1.02)     9.1770 (1.0)      0.2192 (1.0)      108.9685 (1.0)    
test_reward[llvm;ObjectTextSizeNorm] (pr531)     9.0912 (1.02)     9.3954 (1.03)     10.1965 (1.0)      9.4596 (1.03)     0.2619 (1.19)     105.7128 (0.97)   
--------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------- benchmark 'test_reward[llvm;ObjectTextSizeO3]': 2 tests --------------------------------------------------
Name (time in ms)                                 Min            Median                Max              Mean            StdDev                 OPS          
------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[llvm;ObjectTextSizeO3] (dev)       8.8645 (1.0)      9.2495 (1.0)      10.0996 (1.02)     9.2701 (1.0)      0.2530 (1.34)     107.8740 (1.0)    
test_reward[llvm;ObjectTextSizeO3] (pr531)     9.0422 (1.02)     9.2972 (1.01)      9.8909 (1.0)      9.3414 (1.01)     0.1893 (1.0)      107.0504 (0.99)   
------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------- benchmark 'test_reward[llvm;ObjectTextSizeOz]': 2 tests --------------------------------------------------
Name (time in ms)                                 Min            Median                Max              Mean            StdDev                 OPS          
------------------------------------------------------------------------------------------------------------------------------------------------------------
test_reward[llvm;ObjectTextSizeOz] (dev)       8.8569 (1.0)      9.0645 (1.0)       9.6368 (1.0)      9.1213 (1.0)      0.1669 (1.0)      109.6330 (1.0)    
test_reward[llvm;ObjectTextSizeOz] (pr531)     9.0020 (1.02)     9.3368 (1.03)     10.1353 (1.05)     9.4163 (1.03)     0.2518 (1.51)     106.1993 (0.97)   
------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_step[dummy-cc]': 2 tests ------------------------------------------------------
Name (time in us)                   Min              Median                 Max                Mean            StdDev            OPS (Kops/s)          
-------------------------------------------------------------------------------------------------------------------------------------------------------
test_step[dummy-cc] (dev)       97.2213 (1.07)     106.5208 (1.04)     113.9361 (1.0)      107.2402 (1.05)     2.4896 (1.0)            9.3249 (0.95)   
test_step[dummy-cc] (pr531)     90.8663 (1.0)      102.0066 (1.0)      119.1542 (1.05)     101.7463 (1.0)      4.1952 (1.69)           9.8284 (1.0)    
-------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------- benchmark 'test_step[dummy-py]': 2 tests -------------------------------------------------------
Name (time in us)                    Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
---------------------------------------------------------------------------------------------------------------------------------------------------------
test_step[dummy-py] (dev)       237.7316 (1.0)      412.9972 (1.0)      494.4091 (1.0)      393.6568 (1.0)      41.9727 (1.0)            2.5403 (1.0)    
test_step[dummy-py] (pr531)     293.3272 (1.23)     429.5504 (1.04)     499.8808 (1.01)     425.5323 (1.08)     43.5022 (1.04)           2.3500 (0.93)   
---------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_step[llvm;fast-benchmark;fast-action]': 2 tests --------------------------------------------------------
Name (time in us)                                           Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_step[llvm;fast-benchmark;fast-action] (dev)       152.2964 (1.0)      169.7935 (1.0)      181.4909 (1.0)      169.2363 (1.0)       4.0641 (1.0)            5.9089 (1.0)    
test_step[llvm;fast-benchmark;fast-action] (pr531)     238.2414 (1.56)     260.5636 (1.53)     288.0098 (1.59)     259.8032 (1.54)     16.9412 (4.17)           3.8491 (0.65)   
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------- benchmark 'test_step[llvm;fast-benchmark;slow-action]': 2 tests --------------------------------------------------------
Name (time in us)                                           Min              Median                 Max                Mean             StdDev            OPS (Kops/s)          
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_step[llvm;fast-benchmark;slow-action] (dev)       514.9390 (1.04)     613.0163 (1.01)     638.2674 (1.0)      596.3250 (1.0)      48.2766 (1.72)           1.6769 (1.0)    
test_step[llvm;fast-benchmark;slow-action] (pr531)     496.6332 (1.0)      609.7359 (1.0)      660.1600 (1.03)     605.0797 (1.01)     28.1452 (1.0)            1.6527 (0.99)   
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------- benchmark 'test_step[llvm;slow-benchmark;fast-action]': 2 tests -------------------------------------------------
Name (time in ms)                                         Min            Median               Max              Mean            StdDev                 OPS          
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_step[llvm;slow-benchmark;fast-action] (dev)       3.2289 (1.34)     4.0975 (1.0)      4.6716 (1.09)     4.0208 (1.0)      0.2395 (1.0)      248.7091 (1.0)    
test_step[llvm;slow-benchmark;fast-action] (pr531)     2.4036 (1.0)      4.1357 (1.01)     4.3040 (1.0)      4.0907 (1.02)     0.2832 (1.18)     244.4588 (0.98)   
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------------------- benchmark 'test_step[llvm;slow-benchmark;slow-action]': 2 tests ---------------------------------------------------
Name (time in ms)                                          Min             Median                Max               Mean            StdDev                OPS          
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_step[llvm;slow-benchmark;slow-action] (dev)       62.6816 (1.0)      64.2325 (1.0)      93.8632 (1.0)      65.2235 (1.0)      3.5290 (1.0)      15.3319 (1.0)    
test_step[llvm;slow-benchmark;slow-action] (pr531)     63.7213 (1.02)     66.0804 (1.03)     98.3201 (1.05)     66.4410 (1.02)     3.6747 (1.04)     15.0509 (0.98)   
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

@ChrisCummins
Copy link
Contributor

One final thing, the list of protobufs in docs/source/rpcs.rst needs updating. This is used to generate the HTML reference documentation:

CleanShot 2022-02-02 at 12 42 51@2x

You can use make docs or make livedocs to test this locally.

Cheers,
Chris

@sogartar
Copy link
Author

sogartar commented Feb 2, 2022

Regarding the optional problem for non-message types. This answer suggests that optional under the hood is actually a oneof. If that is the case it makes more sense to use a oneof for forward compatibility when we can switch to optional. I don't know if that is really true. oneof looks cleaner anyway because you don't have the additional indirection.

I wonder if moving the name field from Space into ActionSpace.name and ObservationSpace.name would be more clear as to what the name is used for?

I don't see a reason to keep it in Space. The nested "names" can be inferred from the dictionary/tuple structure.

@sogartar
Copy link
Author

sogartar commented Feb 3, 2022

@ChrisCummins, I added sparse documentation. It can be better.
docs/source/rpcs.rst is up-to-date with the new proto types.

The PR is ready for a follow-up review.

@ChrisCummins
Copy link
Contributor

Hi @sogartar, thanks for addressing those comments so quickly.

I think moving name into observation/action space wrappers is a big improvement. The use of oneof as a wrapper around the optional fields is also nice, even if it is just a workaround for tooling that needs updating. Thanks for doing that.

This is looking in good shape now. I notice that there is a couple of merge conflicts (I think they're just trivial churn in module imports). If you could please rebase off development I think this looks good to land!

Cheers,
Chris

@sogartar
Copy link
Author

sogartar commented Feb 3, 2022

@ChrisCummins, I squashed and rebased this PR.
I noticed that there are a few tests failing, that are also failing on the development branch.

//examples/example_compiler_gym_service:env_tests                        FAILED in 22.5s
//examples/loop_optimizations_service:env_tests                          FAILED in 26.1s
//tests/llvm:custom_benchmarks_test                                      FAILED in 65.8s
//benchmarks:bench_test                                                  FAILED in 7 out of 8 in 72.4s

@ChrisCummins
Copy link
Contributor

Fantastic, thanks so much @sogartar! Merging.

Cheers,
Chris

@ChrisCummins ChrisCummins merged commit e248330 into facebookresearch:development Feb 4, 2022
CompilerGym roadmap automation moved this from In progress to Done (not yet shipped) Feb 4, 2022
This was referenced Mar 18, 2022
ChrisCummins added a commit that referenced this pull request May 24, 2022
This release adds a new compiler environment, new APIs, and a suite of backend
improvements to improve the flexibility of CompilerGym environments. Many thanks
to code contributors: @sogartar, @KyleHerndon, @SoumyajitKarmakar@uduse, and
@anthony0727!

Highlights of this release include:

- [mlir] Began work on a new environment for matrix multiplication using MLIR
  ([#652](#652), thanks
  @KyleHerndon and @sogartar!). Note this environment is not yet included in the
  pypi package and must be [compiled from
  source](https://github.com/facebookresearch/CompilerGym/blob/development/INSTALL.md#building-from-source-with-cmake).
- [llvm] Added a new `env.benchmark_from_clang_invocation()` method ([#577](#577)) that can be used for constructing LLVM environment automatically from C/C++ compiler invocations. This makes it much easier to integrate CompilerGym with your existing build scripts.
- Added three new wrapper classes: `Counter`, that provides op counts for
  analysis ([#683](#683));
  `SynchronousSqliteLogger`, that provides logging of environment interactions
  to a relational database
  ([#679](#679)), and
  `ForkOnStep` that provides an `undo()` operation
  ([#682](#682)).
- Added `reward_space` and `observation_space` parameters to `env.reset()`
  ([#659](#659), thanks
  @SoumyajitKarmakar!)

This release includes a number of improvements to the backend APIs that make it
easier to write new CompilerGym environments:

- Refactored the backend to make `CompilerEnv` an abstract interface, and
  `ClientServiceCompilerEnv` the concrete implementation of this interface. This
  enables new environments to be implemented without using gRPC
  ([#633](#633), thanks
  @sogartar!).
- Extended the support for different types of action and observation spaces
  ([#641](#641),
  [#643](#643), thanks
  @sogartar!), including new `Permutation` and `SpaceSequence` spaces
  ([#645](#645), thanks
  @sogartar!)..
- Added a new `disk/` subdirectory to compiler service's working directories,
  which is symlinked to an on-disk location for devices which support in-memory
  working directories. This fixes a bug with leftover temporary directories from
  LLVM ([#672](#672)).

This release also includes numerous bug fixes and improvements, many of which
were reported or fixed by the community. For example, fixing a bug in cache file
locations ([#656](#656),
thanks @uduse!), and a missing flag definition in example code
([#684](#684), thanks
@anthony0727!).

**Full Changelog**:
v0.2.3...v0.2.4

This release brings in deprecating changes to the core `env.step()` routine, and
lays the groundwork for enabling new types of compiler optimizations to be
exposed through CompilerGym. Many thanks to code contributors: @mostafaelhoushi,
@sogartar, @KyleHerndon, @uduse, @parthchadha, and @xtremey!

Highlights of this release include:

- Added a new `TextSizeInBytes` observation space for LLVM
  ([#575](#575)).
* Added a new PPO leaderboard entry
  ([#580](#580). Thanks
  @xtremey!
- Fixed a bug in which temporary directories created by the LLVM environment
  were not cleaned up
  ([#592](#592)).
- **[Backend]** The function `createAndRunCompilerGymService` now returns an
  int, which is the exit return code
  ([#592](#592)).
- Improvements to the examples documentation
  ([#548](#548)) and FAQ
  ([#586](#586))

Deprecations and breaking changes:

- `CompilerEnv.step` no longer accepts a list of actions
  ([#627](#627)). A new
  method, `CompilerEnv.multistep` provides this functionality. This is to
  provide compatibility with environments whose action spaces are lists. To
  update your code, replace any calls to `env.step()` which take a list of
  actions to use `env.multistep()`. Thanks @sogartar!
- The arguments `observations` and `rewards` to `step()` have been renamed
  `observation_spaces` and `reward_spaces`, respectively
  ([#627](#627)).
- `Reward.id` has been renamed `Reward.name`
  ([#565](#565),
  [#612](#612)). Thanks
  @parthchadha!
* The backend protocol buffer schema has been updated to natively support more
  types of observation and action, and to support nested spaces
  ([#531](#531)). Thanks
  @sogartar!
ChrisCummins added a commit that referenced this pull request May 24, 2022
This release adds a new compiler environment, new APIs, and a suite of backend
improvements to improve the flexibility of CompilerGym environments. Many thanks
to code contributors: @sogartar, @KyleHerndon, @SoumyajitKarmakar@uduse, and
@anthony0727!

Highlights of this release include:

- [mlir] Began work on a new environment for matrix multiplication using MLIR
  ([#652](#652), thanks
  @KyleHerndon and @sogartar!). Note this environment is not yet included in the
  pypi package and must be [compiled from
  source](https://github.com/facebookresearch/CompilerGym/blob/development/INSTALL.md#building-from-source-with-cmake).
- [llvm] Added a new `env.benchmark_from_clang_invocation()` method ([#577](#577)) that can be used for constructing LLVM environment automatically from C/C++ compiler invocations. This makes it much easier to integrate CompilerGym with your existing build scripts.
- Added three new wrapper classes: `Counter`, that provides op counts for
  analysis ([#683](#683));
  `SynchronousSqliteLogger`, that provides logging of environment interactions
  to a relational database
  ([#679](#679)), and
  `ForkOnStep` that provides an `undo()` operation
  ([#682](#682)).
- Added `reward_space` and `observation_space` parameters to `env.reset()`
  ([#659](#659), thanks
  @SoumyajitKarmakar!)

This release includes a number of improvements to the backend APIs that make it
easier to write new CompilerGym environments:

- Refactored the backend to make `CompilerEnv` an abstract interface, and
  `ClientServiceCompilerEnv` the concrete implementation of this interface. This
  enables new environments to be implemented without using gRPC
  ([#633](#633), thanks
  @sogartar!).
- Extended the support for different types of action and observation spaces
  ([#641](#641),
  [#643](#643), thanks
  @sogartar!), including new `Permutation` and `SpaceSequence` spaces
  ([#645](#645), thanks
  @sogartar!)..
- Added a new `disk/` subdirectory to compiler service's working directories,
  which is symlinked to an on-disk location for devices which support in-memory
  working directories. This fixes a bug with leftover temporary directories from
  LLVM ([#672](#672)).

This release also includes numerous bug fixes and improvements, many of which
were reported or fixed by the community. For example, fixing a bug in cache file
locations ([#656](#656),
thanks @uduse!), and a missing flag definition in example code
([#684](#684), thanks
@anthony0727!).

**Full Changelog**:
v0.2.3...v0.2.4

This release brings in deprecating changes to the core `env.step()` routine, and
lays the groundwork for enabling new types of compiler optimizations to be
exposed through CompilerGym. Many thanks to code contributors: @mostafaelhoushi,
@sogartar, @KyleHerndon, @uduse, @parthchadha, and @xtremey!

Highlights of this release include:

- Added a new `TextSizeInBytes` observation space for LLVM
  ([#575](#575)).
* Added a new PPO leaderboard entry
  ([#580](#580). Thanks
  @xtremey!
- Fixed a bug in which temporary directories created by the LLVM environment
  were not cleaned up
  ([#592](#592)).
- **[Backend]** The function `createAndRunCompilerGymService` now returns an
  int, which is the exit return code
  ([#592](#592)).
- Improvements to the examples documentation
  ([#548](#548)) and FAQ
  ([#586](#586))

Deprecations and breaking changes:

- `CompilerEnv.step` no longer accepts a list of actions
  ([#627](#627)). A new
  method, `CompilerEnv.multistep` provides this functionality. This is to
  provide compatibility with environments whose action spaces are lists. To
  update your code, replace any calls to `env.step()` which take a list of
  actions to use `env.multistep()`. Thanks @sogartar!
- The arguments `observations` and `rewards` to `step()` have been renamed
  `observation_spaces` and `reward_spaces`, respectively
  ([#627](#627)).
- `Reward.id` has been renamed `Reward.name`
  ([#565](#565),
  [#612](#612)). Thanks
  @parthchadha!
* The backend protocol buffer schema has been updated to natively support more
  types of observation and action, and to support nested spaces
  ([#531](#531)). Thanks
  @sogartar!
ChrisCummins added a commit that referenced this pull request May 24, 2022
This release adds a new compiler environment, new APIs, and a suite of backend
improvements to improve the flexibility of CompilerGym environments. Many thanks
to code contributors: @sogartar, @KyleHerndon, @SoumyajitKarmakar@uduse, and
@anthony0727!

Highlights of this release include:

- [mlir] Began work on a new environment for matrix multiplication using MLIR
  ([#652](#652), thanks
  @KyleHerndon and @sogartar!). Note this environment is not yet included in the
  pypi package and must be [compiled from
  source](https://github.com/facebookresearch/CompilerGym/blob/development/INSTALL.md#building-from-source-with-cmake).
- [llvm] Added a new `env.benchmark_from_clang_invocation()` method ([#577](#577)) that can be used for constructing LLVM environment automatically from C/C++ compiler invocations. This makes it much easier to integrate CompilerGym with your existing build scripts.
- Added three new wrapper classes: `Counter`, that provides op counts for
  analysis ([#683](#683));
  `SynchronousSqliteLogger`, that provides logging of environment interactions
  to a relational database
  ([#679](#679)), and
  `ForkOnStep` that provides an `undo()` operation
  ([#682](#682)).
- Added `reward_space` and `observation_space` parameters to `env.reset()`
  ([#659](#659), thanks
  @SoumyajitKarmakar!)

This release includes a number of improvements to the backend APIs that make it
easier to write new CompilerGym environments:

- Refactored the backend to make `CompilerEnv` an abstract interface, and
  `ClientServiceCompilerEnv` the concrete implementation of this interface. This
  enables new environments to be implemented without using gRPC
  ([#633](#633), thanks
  @sogartar!).
- Extended the support for different types of action and observation spaces
  ([#641](#641),
  [#643](#643), thanks
  @sogartar!), including new `Permutation` and `SpaceSequence` spaces
  ([#645](#645), thanks
  @sogartar!)..
- Added a new `disk/` subdirectory to compiler service's working directories,
  which is symlinked to an on-disk location for devices which support in-memory
  working directories. This fixes a bug with leftover temporary directories from
  LLVM ([#672](#672)).

This release also includes numerous bug fixes and improvements, many of which
were reported or fixed by the community. For example, fixing a bug in cache file
locations ([#656](#656),
thanks @uduse!), and a missing flag definition in example code
([#684](#684), thanks
@anthony0727!).

**Full Changelog**:
v0.2.3...v0.2.4

This release brings in deprecating changes to the core `env.step()` routine, and
lays the groundwork for enabling new types of compiler optimizations to be
exposed through CompilerGym. Many thanks to code contributors: @mostafaelhoushi,
@sogartar, @KyleHerndon, @uduse, @parthchadha, and @xtremey!

Highlights of this release include:

- Added a new `TextSizeInBytes` observation space for LLVM
  ([#575](#575)).
* Added a new PPO leaderboard entry
  ([#580](#580). Thanks
  @xtremey!
- Fixed a bug in which temporary directories created by the LLVM environment
  were not cleaned up
  ([#592](#592)).
- **[Backend]** The function `createAndRunCompilerGymService` now returns an
  int, which is the exit return code
  ([#592](#592)).
- Improvements to the examples documentation
  ([#548](#548)) and FAQ
  ([#586](#586))

Deprecations and breaking changes:

- `CompilerEnv.step` no longer accepts a list of actions
  ([#627](#627)). A new
  method, `CompilerEnv.multistep` provides this functionality. This is to
  provide compatibility with environments whose action spaces are lists. To
  update your code, replace any calls to `env.step()` which take a list of
  actions to use `env.multistep()`. Thanks @sogartar!
- The arguments `observations` and `rewards` to `step()` have been renamed
  `observation_spaces` and `reward_spaces`, respectively
  ([#627](#627)).
- `Reward.id` has been renamed `Reward.name`
  ([#565](#565),
  [#612](#612)). Thanks
  @parthchadha!
* The backend protocol buffer schema has been updated to natively support more
  types of observation and action, and to support nested spaces
  ([#531](#531)). Thanks
  @sogartar!
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.
Projects
CompilerGym roadmap
Done (not yet shipped)
Development

Successfully merging this pull request may close these issues.

Nested spaces in gRPC
4 participants