Skip to content

use one ActorEnvironment for actor construction (#4530) - #4530

Open
shayne-fletcher wants to merge 1 commit into
meta-pytorch:mainfrom
shayne-fletcher:export-D114075166
Open

use one ActorEnvironment for actor construction (#4530)#4530
shayne-fletcher wants to merge 1 commit into
meta-pytorch:mainfrom
shayne-fletcher:export-D114075166

Conversation

@shayne-fletcher

@shayne-fletcher shayne-fletcher commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary:

D113320848 carries the caller's ActorEnvironment across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: RemoteSpawn::new reads the same environment that the runtime stores and later inherits.

CAST_POINT tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. gspawn_uid assigns no point of its own, so if its parent has a CAST_POINT, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own CAST_POINT. documentation and tests pin this distinction.

the remaining changes mechanically update RemoteSpawn implementations and remove the old transient-header merge.

Differential Revision: D114075166

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 29, 2026
@meta-codesync

meta-codesync Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114075166.

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

proc-mesh spawn replaces `CAST_POINT` with the new actor's assigned point. ordinary `gspawn_uid` assigns no mesh point, so it inherits the parent's value unchanged. documentation and tests clarify that environmental `CAST_POINT` is construction context, not proof of mesh membership; delivery still uses the current message header.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
@meta-codesync meta-codesync Bot changed the title use one ActorEnvironment for actor construction use one ActorEnvironment for actor construction (#4530) Jul 29, 2026
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 29, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 31, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 31, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Jul 31, 2026
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
Summary:
Pull Request resolved: meta-pytorch#4530

D113320848 carries the caller's `ActorEnvironment` across remote gspawn. this follow-up removes the remaining split between that environment and separate constructor headers: `RemoteSpawn::new` reads the same environment that the runtime stores and later inherits.

`CAST_POINT` tells a mesh-created actor where it sits in the mesh. proc-mesh spawn sets it to the new actor's assigned point. `gspawn_uid` assigns no point of its own, so if its parent has a `CAST_POINT`, the child inherits and sees the parent's point while it is being created and initialized. that inherited value cannot be taken to mean that the child occupies the same mesh slot. normal message handling is unaffected because each delivered message carries its own `CAST_POINT`. documentation and tests pin this distinction.

the remaining changes mechanically update `RemoteSpawn` implementations and remove the old transient-header merge.

Differential Revision: D114075166
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant