mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[ROCm][Windows] Revert copying hipblaslt and rocblas dirs. (#159083)
This reverts the changes fromb367e5f6a6. This will also close https://github.com/pytorch/pytorch/pull/158922. Since30387ab2e4, ROCm is bootstrapped using the 'rocm' Python module which contains these files (see https://github.com/ROCm/TheRock/blob/main/docs/packaging/python_packaging.md), so they do not need to be bundled into torch/lib. There was also a bug in here - if `ROCM_DIR` is unset, the code crashes: ``` File "D:\projects\TheRock\external-builds\pytorch\.venv\Lib\site-packages\setuptools\_distutils\dist.py", line 1002, in run_command cmd_obj.run() File "D:\b\pytorch_main\setup.py", line 853, in run rocm_dir_path = Path(os.environ["ROCM_DIR"]) ~~~~~~~~~~^^^^^^^^^^^^ File "<frozen os>", line 714, in __getitem__ KeyError: 'ROCM_DIR' ``` The code could have checked for `ROCM_PATH` too. Pull Request resolved: https://github.com/pytorch/pytorch/pull/159083 Approved by: https://github.com/jeffdaily
This commit is contained in:
parent
eed9dbf70f
commit
bfc873d02e
17
setup.py
17
setup.py
|
|
@ -1226,23 +1226,6 @@ class build_ext(setuptools.command.build_ext.build_ext):
|
||||||
target_dir.mkdir(parents=True, exist_ok=True)
|
target_dir.mkdir(parents=True, exist_ok=True)
|
||||||
self.copy_file(export_lib, target_lib)
|
self.copy_file(export_lib, target_lib)
|
||||||
|
|
||||||
# In ROCm on Windows case copy rocblas and hipblaslt files into
|
|
||||||
# torch/lib/rocblas/library and torch/lib/hipblaslt/library
|
|
||||||
if str2bool(os.getenv("USE_ROCM")):
|
|
||||||
rocm_dir_path = Path(os.environ["ROCM_DIR"])
|
|
||||||
rocm_bin_path = rocm_dir_path / "bin"
|
|
||||||
rocblas_dir = rocm_bin_path / "rocblas"
|
|
||||||
target_rocblas_dir = target_dir / "rocblas"
|
|
||||||
target_rocblas_dir.mkdir(parents=True, exist_ok=True)
|
|
||||||
self.copy_tree(rocblas_dir, str(target_rocblas_dir))
|
|
||||||
|
|
||||||
hipblaslt_dir = rocm_bin_path / "hipblaslt"
|
|
||||||
target_hipblaslt_dir = target_dir / "hipblaslt"
|
|
||||||
target_hipblaslt_dir.mkdir(parents=True, exist_ok=True)
|
|
||||||
self.copy_tree(hipblaslt_dir, str(target_hipblaslt_dir))
|
|
||||||
else:
|
|
||||||
report("The specified environment variable does not exist.")
|
|
||||||
|
|
||||||
def build_extensions(self) -> None:
|
def build_extensions(self) -> None:
|
||||||
self.create_compile_commands()
|
self.create_compile_commands()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user