prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Align terminology (`option` v.s. `config`)
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `pytorch_pfn_extras/runtime/_to.py`
  Content:
  ```
  1 from typing import Any, Dict, Optional, Type, TypeVar
  2 
  3 import torch
  4 
  5 import pytorch_pfn_extras as ppe
  6 from pytorch_pfn_extras.runtime._runtime import DeviceLike, BaseRuntime
  7 
  8 
  9 ModuleOrTensor = TypeVar('ModuleOrTensor', torch.nn.Module, torch.Tensor)
  10 
  11 
  12 def to(
  13         module_or_tensor: ModuleOrTensor,
  14         device: DeviceLike,
  15         *,
  16         config: Optional[Dict[str, Any]] = None,
  17         runtime_class: Optional[Type[BaseRuntime]] = None,
  18 ) -> ModuleOrTensor:
  19     """A function to transfer the given object to the given device.
  20 
  21     If PyTorch's device type is given as the ``device`` argument,
  22     the behavior of this function is  equivalent to
  23     ``module_or_tensor.to(module_or_tensor, device)``.
  24 
  25     Otherwise, this function uses the **Runtime** mechanism.
  26     This function looks for the Runtime for the device from the RuntimeRegistry
  27     and delegates the actual transfer operation to it.
  28 
  29     See also the documentation of ``ppe.runtime.BaseRuntime`` for details.
  30 
  31     Args:
  32         module_or_tensor (torch.nn.Module or torch.Tensor):
  33             An object to be transferred.
  34         device (torch.device or str):
  35             The device that the input object is transferred to.
  36         config (dict, optional):
  37             A config of dictionary type that is passed to
  38             ``runtime_class.__init__`` as an argument.
  39         runtime_class:
  40             A runtime class inherited from `BaseRuntime` class.
  41             If ``None``, a runtime class is automatically selected
  42             based on the ``device`` argument from the runtime registry.
  43 
  44     Returns:
  45         A `torch.Tensor` with the specified device.
  46     """
  47     if config is None:
  48         config = {}
  49     if runtime_class is None:
  50         registry = ppe.runtime.runtime_registry
  51         runtime_class = registry.get_runtime_class_for_device_spec(device)
  52     runtime = runtime_class(device, config)
  53     obj = module_or_tensor
  54     if isinstance(obj, torch.nn.Module):
  55         ppe.runtime._runtime._set_module_runtime_tag(obj, runtime)
  56         return runtime.move_module(obj)
  57     elif isinstance(obj, torch.Tensor):
  58         return runtime.move_tensor(obj)
  59     else:
  60         raise ValueError('Unsupported type for module_or_tensor')
  61
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/pytorch_pfn_extras/runtime/_to.py b/pytorch_pfn_extras/runtime/_to.py
  --- a/pytorch_pfn_extras/runtime/_to.py
  +++ b/pytorch_pfn_extras/runtime/_to.py
  @@ -13,8 +13,9 @@
           module_or_tensor: ModuleOrTensor,
           device: DeviceLike,
           *,
  -        config: Optional[Dict[str, Any]] = None,
  +        options: Optional[Dict[str, Any]] = None,
           runtime_class: Optional[Type[BaseRuntime]] = None,
  +        config: Optional[Dict[str, Any]] = None,
   ) -> ModuleOrTensor:
       """A function to transfer the given object to the given device.
   
  @@ -33,23 +34,30 @@
               An object to be transferred.
           device (torch.device or str):
               The device that the input object is transferred to.
  -        config (dict, optional):
  -            A config of dictionary type that is passed to
  +        options (dict, optional):
  +            An options of dictionary type that is passed to
               ``runtime_class.__init__`` as an argument.
           runtime_class:
               A runtime class inherited from `BaseRuntime` class.
               If ``None``, a runtime class is automatically selected
               based on the ``device`` argument from the runtime registry.
  +        config (dict, optional):
  +            DEPRECATED. Use `options`.
   
       Returns:
           A `torch.Tensor` with the specified device.
       """
  -    if config is None:
  -        config = {}
  +    if options is None:
  +        options = {}
  +        if config is not None:
  +            options = config
  +    elif config is not None:
  +        raise ValueError('options and config cannot be specified together')
  +
       if runtime_class is None:
           registry = ppe.runtime.runtime_registry
           runtime_class = registry.get_runtime_class_for_device_spec(device)
  -    runtime = runtime_class(device, config)
  +    runtime = runtime_class(device, options)
       obj = module_or_tensor
       if isinstance(obj, torch.nn.Module):
           ppe.runtime._runtime._set_module_runtime_tag(obj, runtime)
  
verification_info: {"golden_diff": "diff --git a/pytorch_pfn_extras/runtime/_to.py b/pytorch_pfn_extras/runtime/_to.py\n--- a/pytorch_pfn_extras/runtime/_to.py\n+++ b/pytorch_pfn_extras/runtime/_to.py\n@@ -13,8 +13,9 @@\n         module_or_tensor: ModuleOrTensor,\n         device: DeviceLike,\n         *,\n-        config: Optional[Dict[str, Any]] = None,\n+        options: Optional[Dict[str, Any]] = None,\n         runtime_class: Optional[Type[BaseRuntime]] = None,\n+        config: Optional[Dict[str, Any]] = None,\n ) -> ModuleOrTensor:\n     \"\"\"A function to transfer the given object to the given device.\n \n@@ -33,23 +34,30 @@\n             An object to be transferred.\n         device (torch.device or str):\n             The device that the input object is transferred to.\n-        config (dict, optional):\n-            A config of dictionary type that is passed to\n+        options (dict, optional):\n+            An options of dictionary type that is passed to\n             ``runtime_class.__init__`` as an argument.\n         runtime_class:\n             A runtime class inherited from `BaseRuntime` class.\n             If ``None``, a runtime class is automatically selected\n             based on the ``device`` argument from the runtime registry.\n+        config (dict, optional):\n+            DEPRECATED. Use `options`.\n \n     Returns:\n         A `torch.Tensor` with the specified device.\n     \"\"\"\n-    if config is None:\n-        config = {}\n+    if options is None:\n+        options = {}\n+        if config is not None:\n+            options = config\n+    elif config is not None:\n+        raise ValueError('options and config cannot be specified together')\n+\n     if runtime_class is None:\n         registry = ppe.runtime.runtime_registry\n         runtime_class = registry.get_runtime_class_for_device_spec(device)\n-    runtime = runtime_class(device, config)\n+    runtime = runtime_class(device, options)\n     obj = module_or_tensor\n     if isinstance(obj, torch.nn.Module):\n         ppe.runtime._runtime._set_module_runtime_tag(obj, runtime)\n", "issue": "Align terminology (`option` v.s. `config`)\n\n", "before_files": [{"content": "from typing import Any, Dict, Optional, Type, TypeVar\n\nimport torch\n\nimport pytorch_pfn_extras as ppe\nfrom pytorch_pfn_extras.runtime._runtime import DeviceLike, BaseRuntime\n\n\nModuleOrTensor = TypeVar('ModuleOrTensor', torch.nn.Module, torch.Tensor)\n\n\ndef to(\n        module_or_tensor: ModuleOrTensor,\n        device: DeviceLike,\n        *,\n        config: Optional[Dict[str, Any]] = None,\n        runtime_class: Optional[Type[BaseRuntime]] = None,\n) -> ModuleOrTensor:\n    \"\"\"A function to transfer the given object to the given device.\n\n    If PyTorch's device type is given as the ``device`` argument,\n    the behavior of this function is  equivalent to\n    ``module_or_tensor.to(module_or_tensor, device)``.\n\n    Otherwise, this function uses the **Runtime** mechanism.\n    This function looks for the Runtime for the device from the RuntimeRegistry\n    and delegates the actual transfer operation to it.\n\n    See also the documentation of ``ppe.runtime.BaseRuntime`` for details.\n\n    Args:\n        module_or_tensor (torch.nn.Module or torch.Tensor):\n            An object to be transferred.\n        device (torch.device or str):\n            The device that the input object is transferred to.\n        config (dict, optional):\n            A config of dictionary type that is passed to\n            ``runtime_class.__init__`` as an argument.\n        runtime_class:\n            A runtime class inherited from `BaseRuntime` class.\n            If ``None``, a runtime class is automatically selected\n            based on the ``device`` argument from the runtime registry.\n\n    Returns:\n        A `torch.Tensor` with the specified device.\n    \"\"\"\n    if config is None:\n        config = {}\n    if runtime_class is None:\n        registry = ppe.runtime.runtime_registry\n        runtime_class = registry.get_runtime_class_for_device_spec(device)\n    runtime = runtime_class(device, config)\n    obj = module_or_tensor\n    if isinstance(obj, torch.nn.Module):\n        ppe.runtime._runtime._set_module_runtime_tag(obj, runtime)\n        return runtime.move_module(obj)\n    elif isinstance(obj, torch.Tensor):\n        return runtime.move_tensor(obj)\n    else:\n        raise ValueError('Unsupported type for module_or_tensor')\n", "path": "pytorch_pfn_extras/runtime/_to.py"}], "after_files": [{"content": "from typing import Any, Dict, Optional, Type, TypeVar\n\nimport torch\n\nimport pytorch_pfn_extras as ppe\nfrom pytorch_pfn_extras.runtime._runtime import DeviceLike, BaseRuntime\n\n\nModuleOrTensor = TypeVar('ModuleOrTensor', torch.nn.Module, torch.Tensor)\n\n\ndef to(\n        module_or_tensor: ModuleOrTensor,\n        device: DeviceLike,\n        *,\n        options: Optional[Dict[str, Any]] = None,\n        runtime_class: Optional[Type[BaseRuntime]] = None,\n        config: Optional[Dict[str, Any]] = None,\n) -> ModuleOrTensor:\n    \"\"\"A function to transfer the given object to the given device.\n\n    If PyTorch's device type is given as the ``device`` argument,\n    the behavior of this function is  equivalent to\n    ``module_or_tensor.to(module_or_tensor, device)``.\n\n    Otherwise, this function uses the **Runtime** mechanism.\n    This function looks for the Runtime for the device from the RuntimeRegistry\n    and delegates the actual transfer operation to it.\n\n    See also the documentation of ``ppe.runtime.BaseRuntime`` for details.\n\n    Args:\n        module_or_tensor (torch.nn.Module or torch.Tensor):\n            An object to be transferred.\n        device (torch.device or str):\n            The device that the input object is transferred to.\n        options (dict, optional):\n            An options of dictionary type that is passed to\n            ``runtime_class.__init__`` as an argument.\n        runtime_class:\n            A runtime class inherited from `BaseRuntime` class.\n            If ``None``, a runtime class is automatically selected\n            based on the ``device`` argument from the runtime registry.\n        config (dict, optional):\n            DEPRECATED. Use `options`.\n\n    Returns:\n        A `torch.Tensor` with the specified device.\n    \"\"\"\n    if options is None:\n        options = {}\n        if config is not None:\n            options = config\n    elif config is not None:\n        raise ValueError('options and config cannot be specified together')\n\n    if runtime_class is None:\n        registry = ppe.runtime.runtime_registry\n        runtime_class = registry.get_runtime_class_for_device_spec(device)\n    runtime = runtime_class(device, options)\n    obj = module_or_tensor\n    if isinstance(obj, torch.nn.Module):\n        ppe.runtime._runtime._set_module_runtime_tag(obj, runtime)\n        return runtime.move_module(obj)\n    elif isinstance(obj, torch.Tensor):\n        return runtime.move_tensor(obj)\n    else:\n        raise ValueError('Unsupported type for module_or_tensor')\n", "path": "pytorch_pfn_extras/runtime/_to.py"}]}