Skip to content
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

[SR-15580] [AutoDiff] Linear map closures should not use @callee_guaranteed convention #57883

Open
rxwei opened this issue Dec 10, 2021 · 0 comments
Labels
AutoDiff compiler The Swift compiler in itself

Comments

@rxwei
Copy link
Member

rxwei commented Dec 10, 2021

Previous ID SR-15580
Radar rdar://71892494
Original Reporter @rxwei
Type Sub-task
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Sub-task, AutoDiff
Assignee None
Priority Medium

md5: f2ec62a16d936b30b8ec66f9e7134d64

Parent-Task:

Issue Description:

`@callee_guaranteed` closure convention is not suitable for AD pullback closures because, combined with its `@owned` parameter convention for the closure context argument, it will always incur an extra retain. In most use cases pullbacks are called exactly once, and the context argument will be consumed directly by the entry basic block. We should change linear maps’ callee convention to `@owned`.

I had a WIP PR earlier if anyone wants to build on that. #34935

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoDiff compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

1 participant