We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] fp_quantizer is not correctly built when non-jit installation
**Describe the bug**
fp_quantizer is not correctly built when non-jit installation.

**To Reproduce**
Steps to reproduce the behavior:
```
DS_BUILD_FP_QUANTIZER=1 pip install deepspeed
```
install will succeed but
```
from deepspeed.ops.fp_quantizer import FP_Quantize
FP_Quantize()
```
will raise `ImportError: dynamic module does not define module export function (PyInit_fp_quantizer_op)`

**Expected behavior**

Renaming csrc/fp_quantizer/quantize.cu may solve the issue.
This restriction seems to be cause of the bug.
> Note that setuptools cannot handle files with the same name but different extensions
https://pytorch.org/tutorials/advanced/cpp_extension.html


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `op_builder/fp_quantizer.py`
Content:
```
1 # Copyright (c) Microsoft Corporation.
2 # SPDX-License-Identifier: Apache-2.0
3 
4 # DeepSpeed Team
5 
6 from .builder import CUDAOpBuilder, installed_cuda_version
7 
8 
9 class FPQuantizerBuilder(CUDAOpBuilder):
10     BUILD_VAR = "DS_BUILD_FP_QUANTIZER"
11     NAME = "fp_quantizer"
12 
13     def __init__(self, name=None):
14         name = self.NAME if name is None else name
15         super().__init__(name=name)
16 
17     def absolute_name(self):
18         return f'deepspeed.ops.fp_quantizer.{self.NAME}_op'
19 
20     def is_compatible(self, verbose=True):
21         try:
22             import torch
23         except ImportError:
24             self.warning("Please install torch if trying to pre-compile inference kernels")
25             return False
26 
27         cuda_okay = True
28         if not self.is_rocm_pytorch() and torch.cuda.is_available():  #ignore-cuda
29             sys_cuda_major, _ = installed_cuda_version()
30             torch_cuda_major = int(torch.version.cuda.split('.')[0])
31             cuda_capability = torch.cuda.get_device_properties(0).major  #ignore-cuda
32             if cuda_capability < 8:
33                 self.warning("NVIDIA Inference is only supported on Ampere and newer architectures")
34                 cuda_okay = False
35             if cuda_capability >= 8:
36                 if torch_cuda_major < 11 or sys_cuda_major < 11:
37                     self.warning("On Ampere and higher architectures please use CUDA 11+")
38                     cuda_okay = False
39         return super().is_compatible(verbose) and cuda_okay
40 
41     def filter_ccs(self, ccs):
42         ccs_retained = []
43         ccs_pruned = []
44         for cc in ccs:
45             if int(cc[0]) >= 8:
46                 ccs_retained.append(cc)
47             else:
48                 ccs_pruned.append(cc)
49         if len(ccs_pruned) > 0:
50             self.warning(f"Filtered compute capabilities {ccs_pruned}")
51         return ccs_retained
52 
53     def sources(self):
54         return [
55             "csrc/fp_quantizer/quantize.cu",
56             "csrc/fp_quantizer/quantize.cpp",
57         ]
58 
59     def extra_ldflags(self):
60         return ['-lcurand']
61 
62     def include_paths(self):
63         return ['csrc/fp_quantizer/includes', 'csrc/includes']
64
```
--- 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()

```

diff --git a/op_builder/fp_quantizer.py b/op_builder/fp_quantizer.py
--- a/op_builder/fp_quantizer.py
+++ b/op_builder/fp_quantizer.py
@@ -52,8 +52,8 @@
 
     def sources(self):
         return [
-            "csrc/fp_quantizer/quantize.cu",
-            "csrc/fp_quantizer/quantize.cpp",
+            "csrc/fp_quantizer/fp_quantize.cu",
+            "csrc/fp_quantizer/fp_quantize.cpp",
         ]
 
     def extra_ldflags(self):

{"golden_diff": "diff --git a/op_builder/fp_quantizer.py b/op_builder/fp_quantizer.py\n--- a/op_builder/fp_quantizer.py\n+++ b/op_builder/fp_quantizer.py\n@@ -52,8 +52,8 @@\n \n     def sources(self):\n         return [\n-            \"csrc/fp_quantizer/quantize.cu\",\n-            \"csrc/fp_quantizer/quantize.cpp\",\n+            \"csrc/fp_quantizer/fp_quantize.cu\",\n+            \"csrc/fp_quantizer/fp_quantize.cpp\",\n         ]\n \n     def extra_ldflags(self):\n", "issue": "[BUG] fp_quantizer is not correctly built when non-jit installation\n**Describe the bug**\r\nfp_quantizer is not correctly built when non-jit installation.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n```\r\nDS_BUILD_FP_QUANTIZER=1 pip install deepspeed\r\n```\r\ninstall will succeed but\r\n```\r\nfrom deepspeed.ops.fp_quantizer import FP_Quantize\r\nFP_Quantize()\r\n```\r\nwill raise `ImportError: dynamic module does not define module export function (PyInit_fp_quantizer_op)`\r\n\r\n**Expected behavior**\r\n\r\nRenaming csrc/fp_quantizer/quantize.cu may solve the issue.\r\nThis restriction seems to be cause of the bug.\r\n> Note that setuptools cannot handle files with the same name but different extensions\r\nhttps://pytorch.org/tutorials/advanced/cpp_extension.html\r\n\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nfrom .builder import CUDAOpBuilder, installed_cuda_version\n\n\nclass FPQuantizerBuilder(CUDAOpBuilder):\n    BUILD_VAR = \"DS_BUILD_FP_QUANTIZER\"\n    NAME = \"fp_quantizer\"\n\n    def __init__(self, name=None):\n        name = self.NAME if name is None else name\n        super().__init__(name=name)\n\n    def absolute_name(self):\n        return f'deepspeed.ops.fp_quantizer.{self.NAME}_op'\n\n    def is_compatible(self, verbose=True):\n        try:\n            import torch\n        except ImportError:\n            self.warning(\"Please install torch if trying to pre-compile inference kernels\")\n            return False\n\n        cuda_okay = True\n        if not self.is_rocm_pytorch() and torch.cuda.is_available():  #ignore-cuda\n            sys_cuda_major, _ = installed_cuda_version()\n            torch_cuda_major = int(torch.version.cuda.split('.')[0])\n            cuda_capability = torch.cuda.get_device_properties(0).major  #ignore-cuda\n            if cuda_capability < 8:\n                self.warning(\"NVIDIA Inference is only supported on Ampere and newer architectures\")\n                cuda_okay = False\n            if cuda_capability >= 8:\n                if torch_cuda_major < 11 or sys_cuda_major < 11:\n                    self.warning(\"On Ampere and higher architectures please use CUDA 11+\")\n                    cuda_okay = False\n        return super().is_compatible(verbose) and cuda_okay\n\n    def filter_ccs(self, ccs):\n        ccs_retained = []\n        ccs_pruned = []\n        for cc in ccs:\n            if int(cc[0]) >= 8:\n                ccs_retained.append(cc)\n            else:\n                ccs_pruned.append(cc)\n        if len(ccs_pruned) > 0:\n            self.warning(f\"Filtered compute capabilities {ccs_pruned}\")\n        return ccs_retained\n\n    def sources(self):\n        return [\n            \"csrc/fp_quantizer/quantize.cu\",\n            \"csrc/fp_quantizer/quantize.cpp\",\n        ]\n\n    def extra_ldflags(self):\n        return ['-lcurand']\n\n    def include_paths(self):\n        return ['csrc/fp_quantizer/includes', 'csrc/includes']\n", "path": "op_builder/fp_quantizer.py"}], "after_files": [{"content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nfrom .builder import CUDAOpBuilder, installed_cuda_version\n\n\nclass FPQuantizerBuilder(CUDAOpBuilder):\n    BUILD_VAR = \"DS_BUILD_FP_QUANTIZER\"\n    NAME = \"fp_quantizer\"\n\n    def __init__(self, name=None):\n        name = self.NAME if name is None else name\n        super().__init__(name=name)\n\n    def absolute_name(self):\n        return f'deepspeed.ops.fp_quantizer.{self.NAME}_op'\n\n    def is_compatible(self, verbose=True):\n        try:\n            import torch\n        except ImportError:\n            self.warning(\"Please install torch if trying to pre-compile inference kernels\")\n            return False\n\n        cuda_okay = True\n        if not self.is_rocm_pytorch() and torch.cuda.is_available():  #ignore-cuda\n            sys_cuda_major, _ = installed_cuda_version()\n            torch_cuda_major = int(torch.version.cuda.split('.')[0])\n            cuda_capability = torch.cuda.get_device_properties(0).major  #ignore-cuda\n            if cuda_capability < 8:\n                self.warning(\"NVIDIA Inference is only supported on Ampere and newer architectures\")\n                cuda_okay = False\n            if cuda_capability >= 8:\n                if torch_cuda_major < 11 or sys_cuda_major < 11:\n                    self.warning(\"On Ampere and higher architectures please use CUDA 11+\")\n                    cuda_okay = False\n        return super().is_compatible(verbose) and cuda_okay\n\n    def filter_ccs(self, ccs):\n        ccs_retained = []\n        ccs_pruned = []\n        for cc in ccs:\n            if int(cc[0]) >= 8:\n                ccs_retained.append(cc)\n            else:\n                ccs_pruned.append(cc)\n        if len(ccs_pruned) > 0:\n            self.warning(f\"Filtered compute capabilities {ccs_pruned}\")\n        return ccs_retained\n\n    def sources(self):\n        return [\n            \"csrc/fp_quantizer/fp_quantize.cu\",\n            \"csrc/fp_quantizer/fp_quantize.cpp\",\n        ]\n\n    def extra_ldflags(self):\n        return ['-lcurand']\n\n    def include_paths(self):\n        return ['csrc/fp_quantizer/includes', 'csrc/includes']\n", "path": "op_builder/fp_quantizer.py"}]}