Skip to content

[Distributed] Func metadata operations and implement executeDistributedTarget entry #40605

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

Merged
merged 7 commits into from
Jan 9, 2022

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Dec 17, 2021

Needs much cleanup

@ktoso ktoso force-pushed the wip-impl-execute-swift branch from 1d7cc12 to 63ef20e Compare December 17, 2021 04:43
@ktoso ktoso added the distributed Feature → concurrency: distributed actor label Dec 17, 2021
@ktoso ktoso force-pushed the wip-impl-execute-swift branch from 63ef20e to 1dbbc06 Compare December 17, 2021 09:57
@ktoso
Copy link
Contributor Author

ktoso commented Dec 17, 2021

@swift-ci please smoke test

@ktoso ktoso marked this pull request as draft December 17, 2021 11:20
@ktoso ktoso force-pushed the wip-impl-execute-swift branch from 1dbbc06 to 79fcb4f Compare December 20, 2021 01:53
@ktoso ktoso force-pushed the wip-impl-execute-swift branch from bf4f989 to 6267940 Compare December 20, 2021 22:24
@ktoso
Copy link
Contributor Author

ktoso commented Dec 20, 2021

@swift-ci please smoke test

@ktoso ktoso marked this pull request as ready for review December 20, 2021 22:30
@ktoso ktoso changed the title [WIP][Distributed] Func metadata operations and implement executeDistributedTarget entry [Distributed] Func metadata operations and implement executeDistributedTarget entry Dec 20, 2021
dont expose new entrypoints

able to get all the way to calling _execute
@ktoso ktoso force-pushed the wip-impl-execute-swift branch from 6267940 to 74ab478 Compare December 20, 2021 22:36
@ktoso
Copy link
Contributor Author

ktoso commented Dec 20, 2021

This needs more work on hardening the demangling but we'll take it step by step.

@swift-ci please smoke test

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

Looks good! I left a couple comments inline but those could be done in a follow-up as well.

@@ -170,74 +281,9 @@ func _executeDistributedTarget(
on actor: AnyObject, // DistributedActor
_ targetName: UnsafePointer<UInt8>, _ targetNameLength: UInt,
argumentBuffer: Builtin.RawPointer, // HeterogeneousBuffer of arguments
resultBuffer: Builtin.RawPointer
resultBuffer: Builtin.RawPointer?
Copy link
Contributor

@xedin xedin Dec 21, 2021

Choose a reason for hiding this comment

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

@ktoso I don't think we can do this, since Optional type has different ABI (on 64-bit it's a struct { i64, i64 } for example). I think you either should make it just a RawPointer or I need to change signature of accessor to accept exploded struct for a result buffer (not sure exactly how it would look like in C++)...

Copy link
Contributor

@xedin xedin Dec 21, 2021

Choose a reason for hiding this comment

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

Actually maybe this is a false alarm... I see multiple places where UnsafeRawPointer is used as an optional in the stdlib

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth it to just switch over to UnsafeRawPointer? for both argumentBuffer: and resultBuffer: to keep it consistent with other APIs e.g. ones from Misc.swift

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure which way to go -- we use Builtin.RawPointer a lot in all of the concurrency APIs so it's consitent with those I guess... but this is the metadata ones I suppose... Let's revisit this once we confirm we got it right -- still trying to get it not crash the invocation... :)

@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

Unrelated failure [2021-12-20 16:17:37.404] [error]: invalidManifestFormat("/private/var/folders/_8/79jmzf2142z2xydc_01btlx00000gn/T/TemporaryDirectory.BliXth/pkg/Package.swift:3:5: error: type annotation missing in pattern\nlet pack\n ^", diagnosticFile: nil)

@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

@swift-ci please smoke test macOS

@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

Note: I'm actually cleaning up the impls right now, extracting common "find node by kind" etc...

@ktoso ktoso force-pushed the wip-impl-execute-swift branch from afe5a1d to d29fc65 Compare December 21, 2021 08:02
@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

Much cleaned up lookup impls and removed some of the leftovers: d29fc65

@ktoso ktoso force-pushed the wip-impl-execute-swift branch from d29fc65 to 376733a Compare December 21, 2021 08:11
@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

Build timed out (after 120 minutes). Marking the build as failed.

😢

@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

@swift-ci please smoke test Linux

1 similar comment
@xedin
Copy link
Contributor

xedin commented Dec 21, 2021

@swift-ci please smoke test Linux

@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

Build timed out (after 120 minutes). Marking the build as failed.
06:08:06 Build was aborted
06:08:06 XFAIL: Swift(linux-x86_64) :: Distributed/Runtime/distributed_actor_remoteCall.swift (15097 of 15097)

but that was precisely XFAILEd... I'll comment out the RUN of it for now

@ktoso
Copy link
Contributor Author

ktoso commented Dec 21, 2021

@swift-ci please smoke test

@ktoso ktoso force-pushed the wip-impl-execute-swift branch from d7cb89b to 31d3818 Compare January 6, 2022 09:04
@ktoso ktoso force-pushed the wip-impl-execute-swift branch from 31d3818 to 7886257 Compare January 6, 2022 09:05
@ktoso
Copy link
Contributor Author

ktoso commented Jan 6, 2022

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Jan 6, 2022

@swift-ci please smoke test Linux

(build had timed out)

@ktoso
Copy link
Contributor Author

ktoso commented Jan 7, 2022

@swift-ci please smoke test Linux

@ktoso
Copy link
Contributor Author

ktoso commented Jan 7, 2022

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Jan 9, 2022

Unrelated failure... 04:52:11 Swift(linux-x86_64) :: Constraints/type_sequence.swift

@ktoso
Copy link
Contributor Author

ktoso commented Jan 9, 2022

@swift-ci please smoke test Linux

@ktoso ktoso merged commit 9438cf6 into swiftlang:main Jan 9, 2022
@ktoso ktoso deleted the wip-impl-execute-swift branch January 9, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants