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

[Layering]: Create Tensor library & move Random. #540

Merged
merged 2 commits into from
Nov 6, 2019
Merged

[Layering]: Create Tensor library & move Random. #540

merged 2 commits into from
Nov 6, 2019

Conversation

saeta
Copy link
Contributor

@saeta saeta commented Nov 3, 2019

This is the first of a series of changes to implement the Layering Swift APIs
Proposal
.
This first change creates the new Tensor library and moves the random number
utilities over.

This is the first of a series of changes to implement the [Layering Swift APIs
Proposal](https://docs.google.com/document/d/1HO_sMhZJHxlDqw4Pjz4qva2s5yzgwxel-82yoK8O6L4/edit#).
This first change creates the new Tensor library and moves the random number
utilities over.
@saeta saeta merged commit 30a1071 into master Nov 6, 2019
@saeta saeta deleted the layers branch November 6, 2019 15:32
@eaplatanios
Copy link
Contributor

@saeta @dan-zheng This PR was merged before making associated changes in apple/swift and so the toolchain won't build anymore. The relevant CMake configurations need to be changed in apple/swift for this change to be compatible.

@dan-zheng
Copy link
Member

@saeta @dan-zheng This PR was merged before making associated changes in apple/swift and so the toolchain won't build anymore. The relevant CMake configurations need to be changed in apple/swift for this change to be compatible.

Thanks for reporting! Could you please share the exact error you encountered?

I'll try to reproduce soon today. stdlib/public/TensorFlow/CMakeLists.txt uses a glob to find Swift sources and the results are cached, so wiping swift-macosx-x86_64/CMakeCache.txt in the build subdirectory may be necessary.

@saeta
Copy link
Contributor Author

saeta commented Nov 7, 2019

@eaplatanios Sorry about that! I got the following error; is this what you got as well?

<unknown>:0: error: filename "Utilities.swift" used twice: '/usr/local/google/home/saeta/src/s4tf6/tensorflow-swift-apis/Sources/Tensor/Utilities.swift' and '/usr/local/google/home/saeta/src/s4tf6/tensorflow-swift-apis/Sources/TensorFlow/Core/Utilities.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name

@dan-zheng
Copy link
Member

@eaplatanios Sorry about that! I got the following error; is this what you got as well?

<unknown>:0: error: filename "Utilities.swift" used twice: '/usr/local/google/home/saeta/src/s4tf6/tensorflow-swift-apis/Sources/Tensor/Utilities.swift' and '/usr/local/google/home/saeta/src/s4tf6/tensorflow-swift-apis/Sources/TensorFlow/Core/Utilities.swift'
<unknown>:0: note: filenames are used to distinguish private declarations with the same name

I reproduced the error. Fixed in:

dan-zheng added a commit that referenced this pull request Nov 7, 2019
Follow-up to #540 fixing
TensorFlow stdlib module compilation.

- Rename `Sources/Tensor/Utilities.swift -> Sources/Tensor/TensorUtilities.swift`
  to fix stdlib compilation error: `filename "Utilities.swift" used twice`.

- Add `#if !COMPILING_TENSORFLOW_STDLIB_MODULE` guards gating `import Tensor`
declarations so that the TensorFlow module can be built as part of the stdlib.
  - This will no longer be necessary when TensorFlow is no longer built as
    part of the stdlib: #488.
@Shashi456
Copy link
Contributor

Shashi456 commented Nov 8, 2019

@saeta, if this is being done systematically and some order of files are being shifted from tensorflow to tensor and deeplearning, I'd love to help as well !

@saeta
Copy link
Contributor Author

saeta commented Nov 11, 2019

Hi @Shashi456 ! Thanks for volunteering. That would be super helpful. I'm currently thinking through what makes sense to do next. As I come up with a plan, I'll be sure to let you know! :-) (There are some other considerations I'm trying to think through, so it might be a little bit.) Thanks again! -Brennan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants