Skip to content

Conversation

@pzhan9
Copy link
Contributor

@pzhan9 pzhan9 commented Nov 6, 2025

Summary: When running fbpkg build //monarch:monarch_dev on 3279935a10 we encounter a compile time error that seems to stem from compiling with different versions of PyTorch. We might want to update our build chain. It seems monarch is once compiled against a third part 2.8.0 pytorch and once against the fbcode version. This version guard helps with this version drift if that's intended.

Reviewed By: pzhan9, zdevito, soulitzer

Differential Revision: D86363543

Summary: When running `fbpkg build //monarch:monarch_dev` on 3279935a10 we encounter a compile time error that seems to stem from compiling with different versions of PyTorch. We might want to update our build chain. It seems monarch is once compiled against a third part 2.8.0 pytorch and once against the fbcode version. This version guard helps with this version drift if that's intended.

Reviewed By: pzhan9, zdevito, soulitzer

Differential Revision: D86363543
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 6, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 6, 2025

@pzhan9 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D86363543.

@meta-codesync
Copy link

meta-codesync bot commented Nov 6, 2025

This pull request has been merged in 395baba.

DEBUG_PRINT(
"// add: " << node->node->name()
<< ", input_nr=" << static_cast<int>(input_nr) << "\n");
#if TORCH_VERSION_NEWER_THAN(2, 8, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pzhan9 Shouldn't this condition have been for 2.9.1? Even the release/2.9 branch has a 4-argument version: https://github.com/pytorch/pytorch/blob/d38164a545b4a4e4e0cf73ce67173f70574890b6/torch/csrc/autograd/input_buffer.h#L31

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed by #2000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants