-
Notifications
You must be signed in to change notification settings - Fork 114
torch-sys --> torch-sys2, monarch no longer links torch #2046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zdevito
wants to merge
17
commits into
gh/zdevito/138/base
Choose a base branch
from
gh/zdevito/138/head
base: gh/zdevito/138/base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
This was referenced Nov 26, 2025
Closed
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) ghstack-source-id: 326994832 Pull Request resolved: #2046
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 326995989 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 326996723 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 326999559 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327164640 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327171516 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327173600 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327177327 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 4, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327194834 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 5, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327293747 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 5, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327430019 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 5, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327431181 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 5, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327445960 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 5, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327462738 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 5, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327480864 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
zdevito
added a commit
that referenced
this pull request
Dec 5, 2025
Pull Request resolved: #2046 This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. ghstack-source-id: 327481295 @exported-using-ghexport Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/)
Open
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch. There are significant advantages now: * importing monarch drops from ~3 seconds to 70ms !!! * importing monarch was the primary reason why things felt slow: every time we started a new process it had to import this stuff, and a lot of those process starts got serialized. Now they they are fast iteration will feel much faster. * The monarch library can work with any somewhat recent version of torch. No need to match monarch to torch. This should make packaging orders of magnitude easier. * Monarch itself is now smalliish at 70MB and can easily be distributed in many places. Torch does not have to be installed in those places for it to work. * It offers teh possibility to statically link libcudart, and rdma, making monarch no longer have any library dependencies. It is much more likely we can "inject" the monarch packages in various python distributions to make monarch work in them. * Less critical need for "torch vs no-torch" bindings. Differential Revision: [D88338645](https://our.internmc.facebook.com/intern/diff/D88338645/) [ghstack-poisoned]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
This replaces torch-sys, with torch-sys2, which are much simpler binings to torch that route through pyo3. This allows us to drop the linking against torch.
There are significant advantages now:
Differential Revision: D88338645