From 868247a6fa3cad5ea2517932ae612baf88ad98b9 Mon Sep 17 00:00:00 2001 From: Chris Cummins Date: Mon, 7 Mar 2022 17:57:46 +0000 Subject: [PATCH] [gcc] Disable service connection pool for GCC. Issue #583. --- compiler_gym/envs/gcc/gcc_env.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler_gym/envs/gcc/gcc_env.py b/compiler_gym/envs/gcc/gcc_env.py index 55e97e7fb3..f89a155bba 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 @@ -77,6 +78,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,