Skip to content

Commit 09e9dc5

Browse files
ChrisCumminsChris Cummins
authored andcommitted
[gcc] Disable service connection pool for GCC.
Issue facebookresearch#583.
1 parent e58fd22 commit 09e9dc5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compiler_gym/envs/gcc/gcc_env.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from compiler_gym.service import ConnectionOpts
1818
from compiler_gym.service.client_service_compiler_env import ClientServiceCompilerEnv
1919
from compiler_gym.spaces import Reward
20+
from compiler_gym.service.connection_pool import ServiceConnectionPoolBase
2021
from compiler_gym.util.decorators import memoized_property
2122
from compiler_gym.util.gym_type_hints import ObservationType, OptionalArgumentValue
2223
from compiler_gym.views import ObservationSpaceSpec
@@ -79,6 +80,13 @@ def __init__(
7980
# initialization may time out.
8081
Gcc(bin=gcc_bin)
8182

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

0 commit comments

Comments
 (0)