Skip to content

Commit

Permalink
build: enable building X10 support with SPM
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
compnerd committed Jan 5, 2021
1 parent d2e3b0c commit e03ad18
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 35 deletions.
4 changes: 4 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ let package = Package(
"PythonKit",
"CTensorFlow",
.product(name: "Numerics", package: "swift-numerics"),
],
swiftSettings: [
.define("USING_X10_BACKEND"),
.define("DEFAULT_BACKEND_EAGER"),
]),
.target(
name: "Experimental",
Expand Down
35 changes: 0 additions & 35 deletions Sources/TensorFlow/Core/Device.swift

This file was deleted.

1 change: 1 addition & 0 deletions Sources/TensorFlow/X10/APIs/CrossReplicaSum.swift
1 change: 1 addition & 0 deletions Sources/TensorFlow/X10/APIs/DeviceScope.swift
1 change: 1 addition & 0 deletions Sources/TensorFlow/X10/APIs/RawOpsManual.swift
1 change: 1 addition & 0 deletions Sources/TensorFlow/X10/Device.swift
1 change: 1 addition & 0 deletions Sources/TensorFlow/X10/RawOpsXLAGenerated.swift
1 change: 1 addition & 0 deletions Sources/TensorFlow/X10/XLAScalarType.swift
1 change: 1 addition & 0 deletions Sources/TensorFlow/X10/XLATensor.swift

0 comments on commit e03ad18

Please sign in to comment.