Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Fix "unable to type-check this expression in reasonable time" errors. #120

Merged
merged 1 commit into from
May 10, 2019

Conversation

dan-zheng
Copy link
Member

Fix compilation via swift build using a post-merge toolchain
(swift-DEVELOPMENT-SNAPSHOT-2019-05-02-a).

Fix compilation via `swift build` using a post-merge toolchain
(`swift-DEVELOPMENT-SNAPSHOT-2019-05-02-a`).
@dan-zheng dan-zheng requested review from rxwei and marcrasi May 10, 2019 00:25
@dan-zheng
Copy link
Member Author

swift test compiles but tests fail. This is unrelated to merge-related changes.

$ swift test
/Users/danielzheng/swift-merge/tensorflow-swift-apis/Tests/DeepLearningTests/LayerTests.swift:137:23: warning: immutable value '𝛁inputs' was never used; consider replacing with '_' or removing it
        let (𝛁rnn, 𝛁inputs) = pullback(.init(inputs))
[9/9] Linking DeepLearningPackageTests
Test Suite 'All tests' started at 2019-05-09 17:20:27.295
Test Suite 'DeepLearningPackageTests.xctest' started at 2019-05-09 17:20:27.295
Test Suite 'ContextTests' started at 2019-05-09 17:20:27.295
Test Case '-[DeepLearningTests.ContextTests testDropout]' started.
Test Case '-[DeepLearningTests.ContextTests testDropout]' passed (0.101 seconds).
Test Case '-[DeepLearningTests.ContextTests testMultithreadedDropout]' started.
Test Case '-[DeepLearningTests.ContextTests testMultithreadedDropout]' passed (0.001 seconds).
Test Suite 'ContextTests' passed at 2019-05-09 17:20:27.397.
	 Executed 2 tests, with 0 failures (0 unexpected) in 0.102 (0.102) seconds
Test Suite 'LayerTests' started at 2019-05-09 17:20:27.397
Test Case '-[DeepLearningTests.LayerTests testAvgPool1D]' started.
Test Case '-[DeepLearningTests.LayerTests testAvgPool1D]' passed (0.003 seconds).
Test Case '-[DeepLearningTests.LayerTests testConv1D]' started.
Test Case '-[DeepLearningTests.LayerTests testConv1D]' passed (0.034 seconds).
Test Case '-[DeepLearningTests.LayerTests testFlatten]' started.
Test Case '-[DeepLearningTests.LayerTests testFlatten]' passed (0.001 seconds).
Test Case '-[DeepLearningTests.LayerTests testGlobalAvgPool1D]' started.
Test Case '-[DeepLearningTests.LayerTests testGlobalAvgPool1D]' passed (0.001 seconds).
Test Case '-[DeepLearningTests.LayerTests testGlobalAvgPool2D]' started.
Test Case '-[DeepLearningTests.LayerTests testGlobalAvgPool2D]' passed (0.000 seconds).
Test Case '-[DeepLearningTests.LayerTests testGlobalAvgPool3D]' started.
Test Case '-[DeepLearningTests.LayerTests testGlobalAvgPool3D]' passed (0.000 seconds).
Test Case '-[DeepLearningTests.LayerTests testMaxPool1D]' started.
Test Case '-[DeepLearningTests.LayerTests testMaxPool1D]' passed (0.001 seconds).
Test Case '-[DeepLearningTests.LayerTests testReshape]' started.
Test Case '-[DeepLearningTests.LayerTests testReshape]' passed (0.001 seconds).
Test Case '-[DeepLearningTests.LayerTests testRNN]' started.
/Users/danielzheng/swift-merge/tensorflow-swift-apis/Tests/DeepLearningTests/LayerTests.swift:133: error: -[DeepLearningTests.LayerTests testRNN] : XCTAssertEqual failed: ("[[[ -0.00262943, -0.005866742,  0.044919778,   0.20036437]], [[0.066890605, 0.049586136, 0.024610005,  0.09341654]], [[0.065792546, 0.009325638,  0.06439907, 0.114802904]], [[  0.055909205, 0.00035158166,   0.054020774,    0.09812111]]]") is not equal to ("[[[-0.0026294366, -0.0058668107,    0.04495003,    0.20311214]], [[ 0.06788494, 0.050665878,  0.02415526,  0.09249911]], [[ 0.06621192, 0.009049267, 0.065047316,  0.11534518]], [[   0.05612204, 0.00022032857,    0.05407162,    0.09784105]]]")
/Users/danielzheng/swift-merge/tensorflow-swift-apis/Tests/DeepLearningTests/LayerTests.swift:138: error: -[DeepLearningTests.LayerTests testRNN] : XCTAssertEqual failed: ("[[          0.0,           0.0,           0.0,           0.0],
 [-0.0051169936,  0.0014167001,  0.0074189613,   0.017496519],
 [ -0.010233987,  0.0028334002,  0.0148379225,   0.034993038],
 [ -0.015350982,  0.0042501003,   0.022256885,    0.05248956],
 [          0.0,           0.0,           0.0,           0.0],
 [          0.0,           0.0,           0.0,           0.0],
 [          0.0,           0.0,           0.0,           0.0],
 [          0.0,           0.0,           0.0,           0.0]]") is not equal to ("[[          0.0,           0.0,           0.0,           0.0],
 [-0.0051278225,  0.0013102926,    0.00740262,   0.018119661],
 [ -0.010255645,  0.0026205853,    0.01480524,   0.036239322],
 [ -0.015383467,   0.003930878,    0.02220786,   0.054358985],
 [          0.0,           0.0,           0.0,           0.0],
 [          0.0,           0.0,           0.0,           0.0],
 [          0.0,           0.0,           0.0,           0.0],
 [          0.0,           0.0,           0.0,           0.0]]")
/Users/danielzheng/swift-merge/tensorflow-swift-apis/Tests/DeepLearningTests/LayerTests.swift:147: error: -[DeepLearningTests.LayerTests testRNN] : XCTAssertEqual failed: ("[-0.051169936,  0.014167001,   0.07418961,   0.17496519]") is not equal to ("[-0.051278222,  0.013102926,    0.0740262,   0.18119662]")
Test Case '-[DeepLearningTests.LayerTests testRNN]' failed (0.018 seconds).
Test Case '-[DeepLearningTests.LayerTests testSimpleRNNCell]' started.
/Users/danielzheng/swift-merge/tensorflow-swift-apis/Tests/DeepLearningTests/LayerTests.swift:122: error: -[DeepLearningTests.LayerTests testSimpleRNNCell] : XCTAssertEqual failed: ("[[0.9921227, 0.9999934, 0.9921227, 0.9999934, 0.9921227]]") is not equal to ("[[  2.76649, 6.2999997,   2.76649, 6.2999997,   2.76649]]")
Test Case '-[DeepLearningTests.LayerTests testSimpleRNNCell]' failed (0.001 seconds).
Test Case '-[DeepLearningTests.LayerTests testUpSampling1D]' started.
Test Case '-[DeepLearningTests.LayerTests testUpSampling1D]' passed (0.001 seconds).
Test Case '-[DeepLearningTests.LayerTests testUpSampling2D]' started.
Test Case '-[DeepLearningTests.LayerTests testUpSampling2D]' passed (0.001 seconds).
Test Case '-[DeepLearningTests.LayerTests testUpSampling3D]' started.
Fatal error: Broadcast between [1,4,1,3,1,2,1,1] and [1,1,6,1,6,1,6,1] is not supported yet.: file /Users/danielzheng/swift-merge/tensorflow-swift-bindings/EagerExecution.swift, line 295

We should set up PR CI for swift-apis and swift-bindings soon.

Copy link
Contributor

@rxwei rxwei left a comment

Choose a reason for hiding this comment

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

It's sad to see that the latest compiler is getting worse at operator type checking.

@dan-zheng
Copy link
Member Author

It's sad to see that the latest compiler is getting worse at operator type checking.

Indeed, that's unfortunate.

@dan-zheng dan-zheng merged commit ca669ca into tensorflow:master May 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants