Open porterchild opened 3 years ago
Hi Porter,
Thanks for reporting. Could you please share the stock toolchain that you've downloaded?
Sure it's the Tag: swift-5.3.3-RELEASE
Sure it's the Tag: swift-5.3.3-RELEASE
Could you try a trunk development snapshot instead? Those are tested in the "stock toolchain" migration PRs, be sure to follow the build instructions in the PR descriptions:
tensorflow/swift-apis
as SwiftPM dependencytensorflow/swift-apis
as SwiftPM dependencyTrunk development snapshots are built from apple/swift:main
branch, similar to the old Swift for TensorFlow toolchains.
Release toolchains are built from release branches and often are missing recent changes related to differentiable programming.
Thanks Dan, that fixed it!
I'm going to miss asking you obvious questions
I'm going to miss asking you obvious questions
I'm still around! Feel free to ping or email me anytime :)
Cool! Glad to know you'll still be around I like TabNine
Many errors later :) , I have a few more questions:
AdditiveArithmetic
, KeyPathIterable
, PointwiseMultiplicative
.. etc. automatic synthesis is gone. I've pulled just the protocols I need from swift-apis
, and I'm importing Numerics
for ElementaryFunctions
. I'd like to understand if I'm just missing bringing some code over from swift-apis
or Numerics
, or if automatic synthesis has changed since the 0.12 release compared to the latest swift mainline. I've had to write a lot more conformances manually compared to the 0.12 release.SIMDX<Float>.sum()
is no longer automatically differentiable, I'm not sure why. I see no mention of it in swift-apis
.For context, I'm on the 1/14 snapshot (the latest snapshot has a new compiler crash
Ah, I just found the comment // FIXME(TF-1103): Derivative registration does not yet support @_alwaysEmitIntoClient original functions like SIMD.sum()
at https://github.com/apple/swift/blob/e3db926e0ce7bb5535e357623b8744c2c276b236/stdlib/public/Differentiation/SIMDDifferentiation.swift.gyb.
So that explains why SIMDX<Float>.sum()
isn't differentiable.
While switching from the 0.12 S4TF release to a stock toolchain from https://swift.org/download/#releases, I've gotten some compiler errors.
Optional
and usingTangentVector
, the compiler says'TangentVector' is not a member type of 'Optional'
. This surprises me. Am I missing something?KeyPathIterable
implementation from swift-apis, I get the error "Cannot find '_forEachFieldWithKeyPath' in scope
", which I thought would be fixed by this PR. I've made sure to use@_spi(Reflection)
to import the special function.Any help would be appreciated.