Commit df99573
authored
fix pip3 install error for example like cutlass-gemm in local build. (#311)
following the
https://github.com/huggingface/kernel-builder/blob/main/docs/local-dev.md
error like
```
copying /tmp/tmpbzk7cg7n.build-lib/cutlass-gemm/_cutlass_gemm_0063d52.abi3.so -> torch-ext/cutlass-gemm
Traceback (most recent call last):
File "/opt/venv/lib/python3.12/site-packages/setuptools/_distutils/file_util.py", line 39, in _copy_file_contents
fdst = open(dst, 'wb')
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'torch-ext/cutlass-gemm/_cutlass_gemm_0063d52.abi3.so'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/venv/lib/python3.12/site-packages/setuptools/command/editable_wheel.py", line 139, in run
self._create_wheel_file(bdist_wheel)
File "/opt/venv/lib/python3.12/site-packages/setuptools/command/editable_wheel.py", line 340, in _create_wheel_file
files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/setuptools/command/editable_wheel.py", line 263, in _run_build_commands
self._run_build_subcommands()
File "/opt/venv/lib/python3.12/site-packages/setuptools/command/editable_wheel.py", line 290, in _run_build_subcommands
self.run_command(name)
File "/opt/venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command
self.distribution.run_command(command)
File "/opt/venv/lib/python3.12/site-packages/setuptools/dist.py", line 1104, in run_command
super().run_command(command)
File "/opt/venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
cmd_obj.run()
File "/opt/venv/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 102, in run
self.copy_extensions_to_source()
File "/opt/venv/lib/python3.12/site-packages/setuptools/command/build_ext.py", line 123, in copy_extensions_to_source
self.copy_file(regular_file, inplace_file, level=self.verbose)
File "/opt/venv/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 421, in copy_file
return file_util.copy_file(
^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.12/site-packages/setuptools/_distutils/file_util.py", line 157, in copy_file
_copy_file_contents(src, dst)
File "/opt/venv/lib/python3.12/site-packages/setuptools/_distutils/file_util.py", line 41, in _copy_file_contents
raise DistutilsFileError(f"could not create '{dst}': {e.strerror}")
distutils.errors.DistutilsFileError: could not create 'torch-ext/cutlass-gemm/_cutlass_gemm_0063d52.abi3.so': No such file or directory
/opt/venv/lib/python3.12/site-packages/setuptools/_distutils/dist.py:1021: _DebuggingTips: Problem in editable installation.
```
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>1 parent 7bd8ac8 commit df99573
4 files changed
+20
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | | - | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | | - | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
| 132 | + | |
132 | 133 | | |
133 | | - | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | | - | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
0 commit comments