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

Commit eebf3c7

Browse files
authored
Merge pull request #1176 from compnerd/x10-spm
build: enable building X10 support with SPM
2 parents d2e3b0c + a215cc6 commit eebf3c7

14 files changed

+34
-35
lines changed

Package.swift

+8
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,21 @@ let package = Package(
4343
.target(
4444
name: "CTensorFlow",
4545
dependencies: []),
46+
.target(
47+
name: "CX10Modules",
48+
dependencies: []),
4649
.target(
4750
name: "TensorFlow",
4851
dependencies: [
4952
"Tensor",
5053
"PythonKit",
5154
"CTensorFlow",
55+
"CX10Modules",
5256
.product(name: "Numerics", package: "swift-numerics"),
57+
],
58+
swiftSettings: [
59+
.define("USING_X10_BACKEND"),
60+
.define("DEFAULT_BACKEND_EAGER"),
5361
]),
5462
.target(
5563
name: "Experimental",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../CX10/device_wrapper.h
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../CX10/module.modulemap
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../CX10/xla_tensor_tf_ops.h
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../CX10/xla_tensor_wrapper.h

Sources/CX10Modules/shim.c

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2019 The TensorFlow Authors. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
extern int _;

Sources/TensorFlow/Core/Device.swift

-35
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../x10/swift_bindings/apis/CrossReplicaSum.swift
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../x10/swift_bindings/apis/DeviceScope.swift
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../x10/swift_bindings/apis/RawOpsManual.swift

Sources/TensorFlow/X10/Device.swift

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../x10/swift_bindings/Device.swift
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../x10/swift_bindings/RawOpsXLAGenerated.swift
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../x10/swift_bindings/XLAScalarType.swift
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../x10/swift_bindings/XLATensor.swift

0 commit comments

Comments
 (0)