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 28, 2022
1 parent ec575ff commit c2ae003
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 @@ -17,6 +17,7 @@
from compiler_gym.service import ConnectionOpts
from compiler_gym.service.client_service_compiler_env import ClientServiceCompilerEnv
from compiler_gym.spaces import Reward
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, OptionalArgumentValue
from compiler_gym.views import ObservationSpaceSpec
Expand Down Expand Up @@ -79,6 +80,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 c2ae003

Please sign in to comment.