Skip to content

Commit fa81bb0

Browse files
committed
[gcc] Disable service connection pool for GCC.
Issue facebookresearch#583.
1 parent de31359 commit fa81bb0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compiler_gym/envs/gcc/gcc_env.py

+8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from compiler_gym.envs.gcc.gcc_rewards import AsmSizeReward, ObjSizeReward
1717
from compiler_gym.service import ConnectionOpts
1818
from compiler_gym.service.client_service_compiler_env import ClientServiceCompilerEnv
19+
from compiler_gym.service.connection_pool import ServiceConnectionPoolBase
1920
from compiler_gym.util.decorators import memoized_property
2021
from compiler_gym.util.gym_type_hints import ObservationType
2122
from compiler_gym.util.gym_type_hints import OptionalArgumentValue
@@ -78,6 +79,13 @@ def __init__(
7879
# initialization may time out.
7980
Gcc(bin=gcc_bin)
8081

82+
# NOTE(github.com/facebookresearch/CompilerGym/pull/583): The GCC
83+
# environment stalls on the StartSession() RPC call when service
84+
# connection caching is enabled. I believe this has something to do with
85+
# the runtime code generation, but have not been able to diagnose it
86+
# yet. For now, disable service connection caching for GCC environments.
87+
kwargs["service_pool"] = ServiceConnectionPoolBase()
88+
8189
super().__init__(
8290
*args,
8391
**kwargs,

0 commit comments

Comments
 (0)