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

Commit

Permalink
Merge pull request #1176 from compnerd/x10-spm
Browse files Browse the repository at this point in the history
build: enable building X10 support with SPM
  • Loading branch information
dan-zheng committed Jan 6, 2021
2 parents d2e3b0c + a215cc6 commit eebf3c7
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 35 deletions.
8 changes: 8 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,21 @@ let package = Package(
.target(
name: "CTensorFlow",
dependencies: []),
.target(
name: "CX10Modules",
dependencies: []),
.target(
name: "TensorFlow",
dependencies: [
"Tensor",
"PythonKit",
"CTensorFlow",
"CX10Modules",
.product(name: "Numerics", package: "swift-numerics"),
],
swiftSettings: [
.define("USING_X10_BACKEND"),
.define("DEFAULT_BACKEND_EAGER"),
]),
.target(
name: "Experimental",
Expand Down
1 change: 1 addition & 0 deletions Sources/CX10Modules/include/device_wrapper.h
1 change: 1 addition & 0 deletions Sources/CX10Modules/include/module.modulemap
1 change: 1 addition & 0 deletions Sources/CX10Modules/include/xla_tensor_tf_ops.h
1 change: 1 addition & 0 deletions Sources/CX10Modules/include/xla_tensor_wrapper.h
15 changes: 15 additions & 0 deletions Sources/CX10Modules/shim.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2019 The TensorFlow Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

extern int _;
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 eebf3c7

Please sign in to comment.