diff --git a/compiler_gym/envs/gcc/gcc_env.py b/compiler_gym/envs/gcc/gcc_env.py index 411668c52a..a490a4bb5c 100644 --- a/compiler_gym/envs/gcc/gcc_env.py +++ b/compiler_gym/envs/gcc/gcc_env.py @@ -16,6 +16,7 @@ from compiler_gym.envs.gcc.gcc_rewards import AsmSizeReward, ObjSizeReward from compiler_gym.service import ConnectionOpts from compiler_gym.service.client_service_compiler_env import ClientServiceCompilerEnv +from compiler_gym.service.connection_pool import ServiceConnectionPoolBase from compiler_gym.util.decorators import memoized_property from compiler_gym.util.gym_type_hints import ObservationType from compiler_gym.util.gym_type_hints import OptionalArgumentValue @@ -78,6 +79,13 @@ def __init__( # initialization may time out. Gcc(bin=gcc_bin) + # NOTE(github.com/facebookresearch/CompilerGym/pull/583): The GCC + # environment stalls on the StartSession() RPC call when service + # connection caching is enabled. I believe this has something to do with + # the runtime code generation, but have not been able to diagnose it + # yet. For now, disable service connection caching for GCC environments. + kwargs["service_pool"] = ServiceConnectionPoolBase() + super().__init__( *args, **kwargs,