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

Commit 9d01d90

Browse files
committed
build: enable building X10 support with SPM
Enable building the Swift interfaces for X10 with SPM. This effectively hard-enables X10 support in TensorFlow as SPM does not provide configuration. In order to accomplish this, we need to create symbolic links to sources in order to merge the `x10` sources into the TensorFlow module. It is not possible to simply move the sources to reflect this structure due to out-of-tree use cases.
1 parent d2e3b0c commit 9d01d90

8 files changed

+11
-0
lines changed

Package.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ let package = Package(
5050
"PythonKit",
5151
"CTensorFlow",
5252
.product(name: "Numerics", package: "swift-numerics"),
53+
],
54+
swiftSettings: [
55+
.define("USING_X10_BACKEND"),
56+
.define("DEFAULT_BACKEND_EAGER"),
5357
]),
5458
.target(
5559
name: "Experimental",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../x10/swift_bindings/apis/CrossReplicaSum.swift
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../x10/swift_bindings/apis/DeviceScope.swift
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../x10/swift_bindings/apis/RawOpsManual.swift

Sources/TensorFlow/X10/Device.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../x10/swift_bindings/Device.swift
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../x10/swift_bindings/RawOpsXLAGenerated.swift
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../x10/swift_bindings/XLAScalarType.swift
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../x10/swift_bindings/XLATensor.swift

0 commit comments

Comments
 (0)