Skip to content

TensorFlow: switch to using CTensorFlow from swift-apis #29402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
9 changes: 5 additions & 4 deletions stdlib/public/TensorFlow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ if (TENSORFLOW_SWIFT_APIS)
endforeach()
endif()

get_filename_component(TensorFlow_LIBRARY_DIR ${TF_LIBRARY} DIRECTORY)
add_swift_target_library(swiftTensorFlow ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
"${SOURCES}"

PRIVATE_LINK_LIBRARIES "${TF_LIBRARIES}"
PRIVATE_LINK_LIBRARIES ${TF_LIBRARY}
SWIFT_MODULE_DEPENDS SwiftOnoneSupport
SWIFT_MODULE_DEPENDS_IOS Darwin
SWIFT_MODULE_DEPENDS_OSX Darwin
Expand All @@ -59,7 +58,7 @@ add_swift_target_library(swiftTensorFlow ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_
SWIFT_MODULE_DEPENDS Python
SWIFT_COMPILE_FLAGS
${swift_stdlib_compile_flags}
-Xcc -I${CMAKE_CURRENT_SOURCE_DIR}
-Xcc -I${TENSORFLOW_SWIFT_APIS}/Sources/CTensorFlow
-Xcc -I${TF_INCLUDE_DIR}
LINK_FLAGS
${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}
Expand All @@ -82,6 +81,8 @@ swift_install_in_component(DIRECTORY ${TF_INCLUDE_DIR}/tensorflow/c/
PATTERN tf_status.h
PATTERN tf_tensor.h
PATTERN eager/c_api.h)
swift_install_in_component(FILES module.modulemap CTensorFlow.h
swift_install_in_component(FILES
${TENSORFLOW_SWIFT_APIS}/Sources/CTensorFlow/module.modulemap
${TENSORFLOW_SWIFT_APIS}/Sources/CTensorFlow/CTensorFlow.h
DESTINATION lib/swift/tensorflow
COMPONENT stdlib)
8 changes: 0 additions & 8 deletions stdlib/public/TensorFlow/CTensorFlow.h

This file was deleted.

5 changes: 0 additions & 5 deletions stdlib/public/TensorFlow/module.modulemap

This file was deleted.