From ed824986ec56057661aee57a572d0a3b61062edb Mon Sep 17 00:00:00 2001 From: Dan Zheng Date: Fri, 8 Jan 2021 07:07:45 -0500 Subject: [PATCH] Add tensorflow/swift-apis as a SwiftPM dependency. This enables building SwiftFusion using stock toolchains from swift.org/download. --- Package.resolved | 60 +++++++++++++++++++++++++++++++----------------- Package.swift | 10 ++++---- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/Package.resolved b/Package.resolved index 03e8fe88..b56b4f24 100644 --- a/Package.resolved +++ b/Package.resolved @@ -10,6 +10,15 @@ "version": "2.4.3" } }, + { + "package": "LoggerKit", + "repositoryURL": "https://github.com/pvieito/LoggerKit.git", + "state": { + "branch": "master", + "revision": "6c0f5ac4d5561086fe6e6381fa35eceb108f1c7a", + "version": null + } + }, { "package": "Penguin", "repositoryURL": "https://github.com/saeta/penguin.git", @@ -29,39 +38,48 @@ } }, { - "package": "swift-argument-parser", - "repositoryURL": "https://github.com/apple/swift-argument-parser.git", + "package": "PythonKit", + "repositoryURL": "https://github.com/pvieito/PythonKit.git", "state": { - "branch": null, - "revision": "92646c0cdbaca076c8d3d0207891785b3379cbff", - "version": "0.3.1" + "branch": "master", + "revision": "260ae70cddeadf42a7a0edce0dfc7f00343b5d1a", + "version": null } }, { - "package": "Benchmark", - "repositoryURL": "https://github.com/google/swift-benchmark.git", + "package": "Rainbow", + "repositoryURL": "https://github.com/onevcat/Rainbow", "state": { "branch": null, - "revision": "8e0ef8bb7482ab97dcd2cd1d6855bd38921c345d", - "version": "0.1.0" + "revision": "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", + "version": "3.2.0" } }, { - "package": "swift-models", - "repositoryURL": "https://github.com/tensorflow/swift-models.git", + "package": "TensorFlow", + "repositoryURL": "https://github.com/tensorflow/swift-apis", "state": { - "branch": null, - "revision": "b2fc0325bf9d476bf2d7a4cd0a09d36486c506e4", + "branch": "main", + "revision": "230d48576fdb80955613b3013a84561be0f92e94", "version": null } }, { - "package": "SwiftProtobuf", - "repositoryURL": "https://github.com/apple/swift-protobuf.git", + "package": "Benchmark", + "repositoryURL": "https://github.com/google/swift-benchmark.git", "state": { "branch": null, - "revision": "da9a52be9cd36c63993291ce3f1b65dafcd1e826", - "version": "1.14.0" + "revision": "8e0ef8bb7482ab97dcd2cd1d6855bd38921c345d", + "version": "0.1.0" + } + }, + { + "package": "swift-numerics", + "repositoryURL": "https://github.com/apple/swift-numerics", + "state": { + "branch": "main", + "revision": "4a2cbc186b1f8cbbc1ace12cef43d65784b2559e", + "version": null } }, { @@ -75,11 +93,11 @@ }, { "package": "TensorBoardX", - "repositoryURL": "https://github.com/ProfFan/tensorboardx-s4tf.git", + "repositoryURL": "https://github.com/dan-zheng/tensorboardx-s4tf.git", "state": { - "branch": null, - "revision": "02838220694f4236ba84a83856581b76ee9cf1bc", - "version": "0.1.3" + "branch": "tensorflow-as-swiftpm-dependency", + "revision": "22852fff51e32640d4aab2bac1510ab1ebdc25df", + "version": null } } ] diff --git a/Package.swift b/Package.swift index e7dc1074..63ee6573 100644 --- a/Package.swift +++ b/Package.swift @@ -21,16 +21,15 @@ let package = Package( targets: ["Pose3SLAMG2O"]) ], dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), .package(name: "Benchmark", url: "https://github.com/google/swift-benchmark.git", from: "0.1.0"), .package(name: "Penguin", url: "https://github.com/saeta/penguin.git", .branch("main")), - .package(name: "TensorBoardX", url: "https://github.com/ProfFan/tensorboardx-s4tf.git", from: "0.1.3"), + .package(name: "TensorBoardX", url: "https://github.com/dan-zheng/tensorboardx-s4tf.git", .branch("tensorflow-as-swiftpm-dependency")), .package(url: "https://github.com/apple/swift-tools-support-core.git", .branch("swift-5.2-branch")), .package(url: "https://github.com/apple/swift-argument-parser.git", from: "0.3.0"), .package(name: "Plotly", url: "https://github.com/vojtamolda/Plotly.swift", from: "0.4.0"), + .package(name: "TensorFlow", url: "https://github.com/tensorflow/swift-apis", .branch("main")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -40,7 +39,8 @@ let package = Package( dependencies: [ .product(name: "PenguinStructures", package: "Penguin"), .product(name: "PenguinTesting", package: "Penguin"), - .product(name: "PenguinParallelWithFoundation", package: "Penguin") + .product(name: "PenguinParallelWithFoundation", package: "Penguin"), + .product(name: "TensorFlow", package: "TensorFlow"), ], exclude: [ "Core/VectorN.swift.gyb", @@ -130,7 +130,7 @@ let package = Package( ]), .target( name: "ModelSupport", - dependencies: ["STBImage"]), + dependencies: ["TensorFlow", "STBImage"]), .target( name: "STBImage", exclude: