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 22, 2022
1 parent de31359 commit fa81bb0
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
from compiler_gym.util.gym_type_hints import OptionalArgumentValue
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit fa81bb0

Please sign in to comment.