borglab / SwiftFusion

Apache License 2.0
115 stars 13 forks source link

Rewrite usages of compiler-synthesized `Differentiable.zeroTangentVector` #261

Open dan-zheng opened 3 years ago

dan-zheng commented 3 years ago

Protocol requirement Differentiable.zeroTangentVectorInitializer and computed property Differentiable.zeroTangentVector are being removed in https://github.com/apple/swift/pull/35329 as a simplification.

"Per-instance zeros" are no longer a concept, there is only the "static universal zero" TangentVector.zero for all tangent vector types.

There are some updates of Differentiable.zeroTangentVector in SwiftFusion. This issue tracks updating those occurrences to use something else (manual implementation of <type>.zeroTangentVector via directly calling Tensor(zeros:on:), etc.

dan-zheng commented 3 years ago

Does anyone (especially Georgia Tech Students like @acoadmarmon) have time to look into this?

That would be a huge help! Help from you on issues like this would also be great empirical evidence that SwiftFusion can scale!

dan-zheng commented 3 years ago

Unless folks (like @acoadmarmon) have time to look into this issue today, I will look into it! It unblocks https://github.com/apple/swift/pull/35329.

I'm happy to do work like this from time to time, but I wouldn't want to be the only "line of defense" as I'm not strictly a SwiftFusion code owner. It would be nice to discuss some process for prioritizing and distributing issues like this in the future!

acoadmarmon commented 3 years ago

Hey Dan! This is on my to do list for tomorrow if it can wait until then.

dan-zheng commented 3 years ago

That would be splendid! Thanks bunches Andrew :) make MLKJ proud