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-9756] [AD] Zero materialization crasher. #52185

Closed
rxwei opened this issue Jan 25, 2019 · 1 comment
Closed

[SR-9756] [AD] Zero materialization crasher. #52185

rxwei opened this issue Jan 25, 2019 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. swift for tensorflow

Comments

@rxwei
Copy link
Member

rxwei commented Jan 25, 2019

Previous ID SR-9756
Radar None
Original Reporter @rxwei
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Swift for TensorFlow
Labels Bug
Assignee @dan-zheng
Priority Medium

md5: 06694da2a89a33c29e504f784968a9d3

Issue Description:

import TensorFlow

public struct Foo : Differentiable {
    @differentiable(wrt: (self, input))
    public func applied(to input: Tensor<Float>) -> Tensor<Float> {
        return Tensor(0)
    }
}
Assertion failed: (conf.hasValue() && "No conformance to AdditiveArithmetic?"), function materializeZeroIndirect, file /Users/rxwei/Development/Swift/swift-tf-source/swift/lib/SILOptimizer/Mandatory/Differentiation.cpp, line 3451.
Stack dump:
0.  Program arguments: /Users/rxwei/Development/Swift/swift-tf-source/build/Ninja-ReleaseAssert+stdlib-Release/swift-macosx-x86_64/bin/swift -frontend -c -primary-file diffable.swift -target x86_64-apple-darwin18.2.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -color-diagnostics -module-name diffable -o /var/folders/v1/m2vc654n5pd00r1hn3g3lppc00h255/T/diffable-730290.o
1.  While running pass #&#8203;150 SILModuleTransform "Differentiation".
0  swift                    0x0000000107ec4838 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  swift                    0x0000000107ec3808 llvm::sys::RunSignalHandlers() + 248
2  swift                    0x0000000107ec4e52 SignalHandler(int) + 258
3  libsystem_platform.dylib 0x00007fff76edcb3d _sigtramp + 29
4  swift                    0x0000000108b80720 cmark_strbuf__initbuf + 122667
5  libsystem_c.dylib        0x00007fff76d9b1c9 abort + 127
6  libsystem_c.dylib        0x00007fff76d63868 basename_r + 0
7  swift                    0x000000010510c705 (anonymous namespace)::AdjointEmitter::materializeZeroIndirect(swift::CanType, swift::SILValue, swift::SILLocation) + 1589
8  swift                    0x000000010510ccf9 (anonymous namespace)::AdjointEmitter::materializeAdjointDirect((anonymous namespace)::AdjointValue, swift::SILLocation) + 1145
9  swift                    0x000000010510252f (anonymous namespace)::AdjointEmitter::run()::'lambda'(unsigned int)::operator()(unsigned int) const + 367
10 swift                    0x00000001050db139 (anonymous namespace)::Differentiation::run() + 8185
11 swift                    0x00000001051cc14b swift::SILPassManager::runModulePass(unsigned int) + 1083
12 swift                    0x00000001051ccc24 swift::SILPassManager::execute() + 692
13 swift                    0x00000001046aefdb swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 187
14 swift                    0x00000001051d5ad4 swift::runSILDiagnosticPasses(swift::SILModule&) + 132
15 swift                    0x000000010455a9fb performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 11291
16 swift                    0x0000000104556d70 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2848
17 swift                    0x00000001045089ae main + 686
18 libdyld.dylib            0x00007fff76cf308d start + 1
@dan-zheng
Copy link
Collaborator

Fixed in #22114.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. swift for tensorflow
Projects
None yet
Development

No branches or pull requests

2 participants