Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# vim swap files
.*.sw[a-z]
.sw?
*.vscode

#==============================================================================#
# Explicit files to ignore (only matches one).
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ Below is more information about TensorFlow-related build arguments.
* Default value: None.
* `tensorflow-swift-apis`: A path to the [tensorflow/swift-apis](https://github.com/tensorflow/swift-apis) deep learning library repository.
* Default value: `tensorflow-swift-apis` if the [tensorflow/swift-apis](https://github.com/tensorflow/swift-apis) repository is cloned. Otherwise, none.
* `tensorflow-swift-bindings`: A path to the [tensorflow/swift-bindings](https://github.com/tensorflow/swift-bindings) repository.
* Default value: `tensorflow-swift-bindings` if the [tensorflow/swift-bindings](https://github.com/tensorflow/swift-bindings) repository is cloned. Otherwise, none.

### Build systems

Expand Down
112 changes: 0 additions & 112 deletions stdlib/public/TensorFlow/ArrayOps.swift

This file was deleted.

36 changes: 3 additions & 33 deletions stdlib/public/TensorFlow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,45 +27,16 @@ list(APPEND swift_stdlib_compile_flags "-Xllvm" "-sil-inline-generics")
list(APPEND swift_stdlib_compile_flags "-Xllvm" "-sil-partial-specialization")
list(APPEND swift_stdlib_compile_flags "-force-single-frontend-invocation")
# FIXME(SR-7972): Some tests fail when TensorFlow is optimized.
# list(APPEND swift_stdlib_compile_flags "-O" "-whole-module-optimization")
list(APPEND swift_stdlib_compile_flags "-Onone")
list(APPEND swift_stdlib_compile_flags "-DCOMPILING_TENSORFLOW_MODULE")

set(SOURCES
ArrayOps.swift
CompilerRuntime.swift
CompositeMath.swift
DataTypes.swift
Execution.swift
Gradients.swift
Ops.swift
# NumPy bridging for `ShapedArray` and `Tensor`.
PythonConversion.swift
ShapedArray.swift
StringOps.swift
StringTensor.swift
Tensor.swift
TensorGroup.swift
TensorHandle.swift
TensorProtocol.swift
TensorShape.swift
Threading.swift
Utilities.swift)

set(GYB_SOURCES
ExecuteOp.swift.gyb)

# Copy TensorFlow bindings file, if it exists.
if (TENSORFLOW_SWIFT_BINDINGS)
file(GLOB_RECURSE TENSORFLOW_SWIFT_BINDINGS_SOURCES
"${TENSORFLOW_SWIFT_BINDINGS}/*.swift")
list(APPEND SOURCES "${TENSORFLOW_SWIFT_BINDINGS_SOURCES}")
endif()
set(SOURCES "")

# Copy TensorFlow high-level API sources, if they exist.
if (TENSORFLOW_SWIFT_APIS)
file(GLOB_RECURSE TENSORFLOW_SWIFT_API_SOURCES
"${TENSORFLOW_SWIFT_APIS}/Sources/*.swift"
"${TENSORFLOW_SWIFT_APIS}/Sources/Core/*.swift")
"${TENSORFLOW_SWIFT_APIS}/Sources/*.swift")
message(STATUS "Using TensorFlow high-level APIs library.")
list(APPEND SOURCES "${TENSORFLOW_SWIFT_API_SOURCES}")
endif()
Expand All @@ -79,7 +50,6 @@ endif()

add_swift_target_library(swiftTensorFlow ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
"${SOURCES}"
GYB_SOURCES "${GYB_SOURCES}"

INCORPORATE_OBJECT_LIBRARIES swiftCTensorFlow
TARGET_SDKS OSX LINUX
Expand Down
Loading