Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Conversation

PaliC
Copy link
Contributor

@PaliC PaliC commented Jul 3, 2024

Companion pr of pytorch/pytorch#130053 on the builder side to remove dead code.

Must be landed after pytorch/pytorch#130053

PaliC added a commit to pytorch/pytorch that referenced this pull request Jul 5, 2024
Removes extraneous .a, .so, and .py files from the split build. From here we can also clean up the builder script which produces the binary to do this. That pr is pytorch/builder#1912

Verification:

The built wheel with BUILD_LIBTORCH_WHL=1 has the following files only (with .a, .so, and .py extensions)

```
sahanpdevgpu086 ~/p/dist (viable/strict)> pwd                                                                                                                                                                                                                            (pytorch-3.10) 
/home/sahanp/pytorch/dist
sahanpdevgpu086 ~/p/dist (viable/strict)> find . -type f \( -name "*.py" -o -name "*.a" -o -name "*.so" \)                                                                                                                                                               (pytorch-3.10) 
./torch/__init__.py
./torch/lib/libbackend_with_compiler.so
./torch/lib/libc10.so
./torch/lib/libjitbackend_test.so
./torch/lib/libtorch.so
./torch/lib/libtorch_cpu.so
./torch/lib/libtorch_global_deps.so
./torch/lib/libtorchbind_test.so
sahanpdevgpu086 ~/p/dist (viable/strict)>
```

[ghstack-poisoned]
tringwald pushed a commit to tringwald/pytorch that referenced this pull request Jul 5, 2024
…30053)

Removes extraneous .a, .so, and .py files from the split build. From here we can also clean up the builder script which produces the binary to do this. That pr is pytorch/builder#1912

Verification:

The built wheel with BUILD_LIBTORCH_WHL=1 has the following files only (with .a, .so, and .py extensions)

```
sahanp@devgpu086 ~/p/dist (viable/strict)> pwd                                                                                                                                                                                                                            (pytorch-3.10)
/home/sahanp/pytorch/dist
sahanp@devgpu086 ~/p/dist (viable/strict)> find . -type f \( -name "*.py" -o -name "*.a" -o -name "*.so" \)                                                                                                                                                               (pytorch-3.10)
./torch/__init__.py
./torch/lib/libbackend_with_compiler.so
./torch/lib/libc10.so
./torch/lib/libjitbackend_test.so
./torch/lib/libtorch.so
./torch/lib/libtorch_cpu.so
./torch/lib/libtorch_global_deps.so
./torch/lib/libtorchbind_test.so
sahanp@devgpu086 ~/p/dist (viable/strict)>
```
Pull Request resolved: pytorch#130053
Approved by: https://github.com/atalman
@PaliC PaliC merged commit e463b5c into main Jul 5, 2024
@PaliC PaliC deleted the palic/remove_dead_code branch July 5, 2024 22:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants