Skip to content

[AutoDiff] Disable failing test with -O. #30776

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 1 commit into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// RUN: not %target-build-swift -O %s

// SR-12493: SIL verification error regarding substituted function types and
// `differentiable_function_extract` instruction. Occurs only with `-O`.

import _Differentiation

func exampleVJP_1(_ x0: Float) -> (Float, (Float) -> (Float)) {
(
x0 * x0,
{ (2 * x0 * $0) }
)
}

func bar() {
let f = differentiableFunction(from: exampleVJP_1)
let pb = pullback(at: 10, in: f)
_ = pb(1)
}
3 changes: 3 additions & 0 deletions test/AutoDiff/stdlib/differential_operators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
// RUN: %target-run %t/differential_operators
// REQUIRES: executable_test

// FIXME(SR-12493): Disable test for `-O` due to SIL verification error.
// REQUIRES: swift_test_mode_optimize_none

import _Differentiation

import StdlibUnittest
Expand Down