Skip to content

Commit

Permalink
[gcc] Disable service connection pool for GCC.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCummins committed Apr 20, 2022
1 parent b5f697d commit 868247a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions compiler_gym/envs/gcc/gcc_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 868247a

Please sign in to comment.