prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  simulate bug func_or_sig vs fn_or_sig named parameter
  There seems to be a difference in the named parameter func_or_sig/fn_or_sig between the cuda.jit() in the simulator vs gpu code. 
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `numba/cuda/simulator/api.py`
  Content:
  ```
  1 '''
  2 Contains CUDA API functions
  3 '''
  4 from __future__ import absolute_import
  5 
  6 from contextlib import contextmanager
  7 from .cudadrv.devices import require_context, reset, gpus
  8 from .kernel import FakeCUDAKernel
  9 from numba.typing import Signature
  10 from warnings import warn
  11 from ..args import In, Out, InOut
  12 
  13 
  14 def select_device(dev=0):
  15     assert dev == 0, 'Only a single device supported by the simulator'
  16 
  17 
  18 class stream(object):
  19     '''
  20     The stream API is supported in the simulator - however, all execution
  21     occurs synchronously, so synchronization requires no operation.
  22     '''
  23     @contextmanager
  24     def auto_synchronize(self):
  25         yield
  26 
  27     def synchronize(self):
  28         pass
  29 
  30 
  31 def synchronize():
  32     pass
  33 
  34 def close():
  35     gpus.closed = True
  36 
  37 
  38 def declare_device(*args, **kwargs):
  39     pass
  40 
  41 
  42 def detect():
  43     print('Found 1 CUDA devices')
  44     print('id %d    %20s %40s' % (0, 'SIMULATOR', '[SUPPORTED]'))
  45     print('%40s: 5.2' % 'compute capability')
  46 
  47 
  48 def list_devices():
  49     return gpus
  50 
  51 
  52 # Events
  53 
  54 class Event(object):
  55     '''
  56     The simulator supports the event API, but they do not record timing info,
  57     and all simulation is synchronous. Execution time is not recorded.
  58     '''
  59     def record(self, stream=0):
  60         pass
  61 
  62     def wait(self, stream=0):
  63         pass
  64 
  65     def synchronize(self):
  66         pass
  67 
  68     def elapsed_time(self, event):
  69         warn('Simulator timings are bogus')
  70         return 0.0
  71 
  72 event = Event
  73 
  74 
  75 def jit(fn_or_sig=None, device=False, debug=False, argtypes=None, inline=False, restype=None,
  76         fastmath=False, link=None):
  77     if link is not None:
  78         raise NotImplementedError('Cannot link PTX in the simulator')
  79     # Check for first argument specifying types - in that case the
  80     # decorator is not being passed a function
  81     if fn_or_sig is None or isinstance(fn_or_sig, (str, tuple, Signature)):
  82         def jitwrapper(fn):
  83             return FakeCUDAKernel(fn,
  84                                   device=device,
  85                                   fastmath=fastmath)
  86         return jitwrapper
  87     return FakeCUDAKernel(fn_or_sig, device=device)
  88 
  89 autojit = jit
  90 
  91 
  92 @contextmanager
  93 def defer_cleanup():
  94     # No effect for simulator
  95     yield
  96
  ```
  --- 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/numba/cuda/simulator/api.py b/numba/cuda/simulator/api.py
  --- a/numba/cuda/simulator/api.py
  +++ b/numba/cuda/simulator/api.py
  @@ -72,19 +72,19 @@
   event = Event
   
   
  -def jit(fn_or_sig=None, device=False, debug=False, argtypes=None, inline=False, restype=None,
  -        fastmath=False, link=None):
  +def jit(func_or_sig=None, device=False, debug=False, argtypes=None,
  +        inline=False, restype=None, fastmath=False, link=None):
       if link is not None:
           raise NotImplementedError('Cannot link PTX in the simulator')
       # Check for first argument specifying types - in that case the
       # decorator is not being passed a function
  -    if fn_or_sig is None or isinstance(fn_or_sig, (str, tuple, Signature)):
  +    if func_or_sig is None or isinstance(func_or_sig, (str, tuple, Signature)):
           def jitwrapper(fn):
               return FakeCUDAKernel(fn,
                                     device=device,
                                     fastmath=fastmath)
           return jitwrapper
  -    return FakeCUDAKernel(fn_or_sig, device=device)
  +    return FakeCUDAKernel(func_or_sig, device=device)
   
   autojit = jit
  
verification_info: {"golden_diff": "diff --git a/numba/cuda/simulator/api.py b/numba/cuda/simulator/api.py\n--- a/numba/cuda/simulator/api.py\n+++ b/numba/cuda/simulator/api.py\n@@ -72,19 +72,19 @@\n event = Event\n \n \n-def jit(fn_or_sig=None, device=False, debug=False, argtypes=None, inline=False, restype=None,\n-        fastmath=False, link=None):\n+def jit(func_or_sig=None, device=False, debug=False, argtypes=None,\n+        inline=False, restype=None, fastmath=False, link=None):\n     if link is not None:\n         raise NotImplementedError('Cannot link PTX in the simulator')\n     # Check for first argument specifying types - in that case the\n     # decorator is not being passed a function\n-    if fn_or_sig is None or isinstance(fn_or_sig, (str, tuple, Signature)):\n+    if func_or_sig is None or isinstance(func_or_sig, (str, tuple, Signature)):\n         def jitwrapper(fn):\n             return FakeCUDAKernel(fn,\n                                   device=device,\n                                   fastmath=fastmath)\n         return jitwrapper\n-    return FakeCUDAKernel(fn_or_sig, device=device)\n+    return FakeCUDAKernel(func_or_sig, device=device)\n \n autojit = jit\n", "issue": "simulate bug func_or_sig vs fn_or_sig named parameter\nThere seems to be a difference in the named parameter func_or_sig/fn_or_sig between the cuda.jit() in the simulator vs gpu code. \n", "before_files": [{"content": "'''\nContains CUDA API functions\n'''\nfrom __future__ import absolute_import\n\nfrom contextlib import contextmanager\nfrom .cudadrv.devices import require_context, reset, gpus\nfrom .kernel import FakeCUDAKernel\nfrom numba.typing import Signature\nfrom warnings import warn\nfrom ..args import In, Out, InOut\n\n\ndef select_device(dev=0):\n    assert dev == 0, 'Only a single device supported by the simulator'\n\n\nclass stream(object):\n    '''\n    The stream API is supported in the simulator - however, all execution\n    occurs synchronously, so synchronization requires no operation.\n    '''\n    @contextmanager\n    def auto_synchronize(self):\n        yield\n\n    def synchronize(self):\n        pass\n\n\ndef synchronize():\n    pass\n\ndef close():\n    gpus.closed = True\n\n\ndef declare_device(*args, **kwargs):\n    pass\n\n\ndef detect():\n    print('Found 1 CUDA devices')\n    print('id %d    %20s %40s' % (0, 'SIMULATOR', '[SUPPORTED]'))\n    print('%40s: 5.2' % 'compute capability')\n\n\ndef list_devices():\n    return gpus\n\n\n# Events\n\nclass Event(object):\n    '''\n    The simulator supports the event API, but they do not record timing info,\n    and all simulation is synchronous. Execution time is not recorded.\n    '''\n    def record(self, stream=0):\n        pass\n\n    def wait(self, stream=0):\n        pass\n\n    def synchronize(self):\n        pass\n\n    def elapsed_time(self, event):\n        warn('Simulator timings are bogus')\n        return 0.0\n\nevent = Event\n\n\ndef jit(fn_or_sig=None, device=False, debug=False, argtypes=None, inline=False, restype=None,\n        fastmath=False, link=None):\n    if link is not None:\n        raise NotImplementedError('Cannot link PTX in the simulator')\n    # Check for first argument specifying types - in that case the\n    # decorator is not being passed a function\n    if fn_or_sig is None or isinstance(fn_or_sig, (str, tuple, Signature)):\n        def jitwrapper(fn):\n            return FakeCUDAKernel(fn,\n                                  device=device,\n                                  fastmath=fastmath)\n        return jitwrapper\n    return FakeCUDAKernel(fn_or_sig, device=device)\n\nautojit = jit\n\n\n@contextmanager\ndef defer_cleanup():\n    # No effect for simulator\n    yield\n", "path": "numba/cuda/simulator/api.py"}], "after_files": [{"content": "'''\nContains CUDA API functions\n'''\nfrom __future__ import absolute_import\n\nfrom contextlib import contextmanager\nfrom .cudadrv.devices import require_context, reset, gpus\nfrom .kernel import FakeCUDAKernel\nfrom numba.typing import Signature\nfrom warnings import warn\nfrom ..args import In, Out, InOut\n\n\ndef select_device(dev=0):\n    assert dev == 0, 'Only a single device supported by the simulator'\n\n\nclass stream(object):\n    '''\n    The stream API is supported in the simulator - however, all execution\n    occurs synchronously, so synchronization requires no operation.\n    '''\n    @contextmanager\n    def auto_synchronize(self):\n        yield\n\n    def synchronize(self):\n        pass\n\n\ndef synchronize():\n    pass\n\ndef close():\n    gpus.closed = True\n\n\ndef declare_device(*args, **kwargs):\n    pass\n\n\ndef detect():\n    print('Found 1 CUDA devices')\n    print('id %d    %20s %40s' % (0, 'SIMULATOR', '[SUPPORTED]'))\n    print('%40s: 5.2' % 'compute capability')\n\n\ndef list_devices():\n    return gpus\n\n\n# Events\n\nclass Event(object):\n    '''\n    The simulator supports the event API, but they do not record timing info,\n    and all simulation is synchronous. Execution time is not recorded.\n    '''\n    def record(self, stream=0):\n        pass\n\n    def wait(self, stream=0):\n        pass\n\n    def synchronize(self):\n        pass\n\n    def elapsed_time(self, event):\n        warn('Simulator timings are bogus')\n        return 0.0\n\nevent = Event\n\n\ndef jit(func_or_sig=None, device=False, debug=False, argtypes=None,\n        inline=False, restype=None, fastmath=False, link=None):\n    if link is not None:\n        raise NotImplementedError('Cannot link PTX in the simulator')\n    # Check for first argument specifying types - in that case the\n    # decorator is not being passed a function\n    if func_or_sig is None or isinstance(func_or_sig, (str, tuple, Signature)):\n        def jitwrapper(fn):\n            return FakeCUDAKernel(fn,\n                                  device=device,\n                                  fastmath=fastmath)\n        return jitwrapper\n    return FakeCUDAKernel(func_or_sig, device=device)\n\nautojit = jit\n\n\n@contextmanager\ndef defer_cleanup():\n    # No effect for simulator\n    yield\n", "path": "numba/cuda/simulator/api.py"}]}