8 ms·
Swift for Tensorflow 0.3.1
- mrath 7y agoIs swift a common language for kind of thing tensorflow is used for? Given that swift does not work on windows and Linux support is sub par, is this only because of Chris Lattner?
- eklavya 7y agoThe way I see it. The technical points have been explained on their GitHub page. One might not agree with it. From an organisation's perspective it makes total sense. You need in house expertise and you need a free hand. Not many languages would have fit both of these things. I mean if it were you or me, wouldn't you pick what you are most comfortable with given it fit the constraints? Linux support for this can't be sub par since the whole stuff will run on linux like 99.99% of the time.
- bobajeff 7y agoQuestion if Swift works on Linux right now what are the chances that it also works on Windows's new built in Linux (WSL2)?
- mdemare 7y agoIf WSL2 allows access to the GPU, chances are good.
- oscargrouch 7y agoI used swift on WSL1 and even compiled natively for Windows. But i guess the pure Windows ecosystem is rough on the edges right now, but doable. And in WSL(1) things have worked pretty the same as in Linux. Just download the packaged binary distributed on their site, and you are ready to go. (Oh, a note; its not the tensorflow branch, if is thats what you want)
- FridgeSeal 7y ago> Is swift a common language for kind of thing tensorflow is used for? Absolutely not. Julia would have been a far better fit.
- rsfinn 7y agoSwift support for Windows has apparently been making great strides lately; see, for example, <https://forums.swift.org/t/swift-windows/22458> https://forums.swift.org/t/swift-windows/22458>. They're not quite at the point of announcing "official" support yet, but the test suite was "effectively ... fully passing ... (pending patches)" as of April 1 of this year. Disclaimer: I don't use Windows but read the Swift development forums from time to time.
- jimfleming 7y agoTo those that are upvoting this and previous Swift + TF announcements: What are you excited about, specifically? Why Swift? Why not Julia? Is it the syntax? Types? Compilation? Performance? Community? I like Swift and all but our ML/DL/RL/DS tools and libraries are in Python (and occasionally R). Most are missing for Swift without an awkward Python compatibility layer and I don't see a compelling reason to adopt it.
- oscargrouch 7y agoAs far as i know, Swift is the only one embedding the graph flow of the TensorFlow directly in its compiler, so those idioms can translante from IR to machine code with paralelism and a fine-tuned machine code. As its very common to target this sort of code to GPU´s, and LLVM can target them as output, i think is mostly because you can design and shape the langage right on its high level representation and tune for high performant code in the low level. The why, i think, its about opportunity.. Chris Lattner going to Google, and people from the language and the compiler side of the fence being open about bake this right into the compiler when necessary.
- pama 7y agoMy top four reasons: 1) the eventual MLIR for LLVM will empower new algorithms; 2) Lattner and team have a track record; 3) vast community of swift application developers; 4) fastai.
- threeseed 7y agoI assume it is because you can use it on iOS/OSX. And people are still doing a lot of Data Science work in R and Scala so I wouldn't say it is at all Python centric.
- sharcerer 7y agothat's not the reason. Read this link: https://www.fast.ai/2019/03/06/fastai-swift/ https://www.fast.ai/2019/03/06/fastai-swift/
- rjvir 7y agoI think this article by Jeremy from fast.ai lays out a compelling case: https://www.fast.ai/2019/03/06/fastai-swift/ https://www.fast.ai/2019/03/06/fastai-swift/
- sandGorgon 7y agoI'm very puzzled about the Swift for Tensorflow investment. I understand that's primarily because of Chris lattner's personal investment...but given Google's massive mindshare in Kotlin/Dart/JavaScript, this is a very puzzling investment. Kotlin is successful because Google was able to drive the direction of the language. For example AndroidX Compose is being built with compiler extensions in Kotlin with Jetbrains. Dart is obviously driven by Google. Swift is going to be controlled and driven by Apple. From a strategic perspective, I don't understand why Google would make an investment like this when Swift-for-Tensorflow has a fundamental need to drive changes in the language itself. Now, I understand if Google didn't have an alternative. Are you saying Kotlin is soooooo worse than Swift that you can't fundamentally take a similar direction ? Kotlin is currently one of the world's most popular languages, born out of sheer LOVE from the community (without being pushed by the giants).
- cwyers 7y agoThey explain what other languages they looked at: https://github.com/tensorflow/swift/blob/master/docs/WhySwiftForTensorFlow.md https://github.com/tensorflow/swift/blob/master/docs/WhySwif... Presumably Kotlin wouldn't work for the same reasons they excluded Scala and Java and C#. (I think that either of C++ or Julia would have probably made better choices, given what they spell out here, but they put a lot more thought into what language to use than most HN commenters seem to give them credit for.)
- newen 7y agoSwift was chosen because Chris Lattner is leading this project (Chris Lattner designed Swift). This explanation is clearly just a token justification for having chosen Swift.
- cwyers 7y agoThe charitable way of looking at that is Chris Lattner is leading this project because the project requires certain things Lattner has experience with, and therefore the language he designed is one that meets all their criteria. Now, it's possible that they were less objective about the language choice than they believe themselves to be, but they certainly have thought about it an awful lot, and they deserve some benefit of the doubt, unless you can demonstrate what of this justification is untrue.
- pjmlp 7y agoCtrl+F Windows, oh well back to ML.NET and Julia.
- mark_l_watson 7y agoGlad to see the update. I have experimented with both the macOS and Linux drops before and they were rough. v0.3.1 is focused on providing a productive platform. Anyway I am on travel without a laptop so I need to wait to try it. The idea of LLVM/Swift ‘turtles all the way down’ might really pay off in the long run. In TensorFlow there is an un-understandable barrier (for me) between the Python layer and the lower level C++ code. Good to see this Swift effort along side Julia + Flux, which offers the same implementation language for the whole system advantage.
- yeldarb 7y agoI took the recent fastai course that had two lessons about S4TF taught by Chris Lattner and walked away excited. It’s not ready for prime time yet but the roadmap looks great. Building auto-differentiation into the language and having an easy way for anyone to experiment with core architecture changes (without killing performance) will be a huge win for everyone. I expect lots of prototyping will be done on S4TF (because it will be easy for developers to keep things on the GPU with XLA and MLIR) and then the things that work will be back-ported to other ecosystems. https://medium.com/tensorflow/mlir-a-new-intermediate-representation-and-compiler-framework-beba999ed18d https://medium.com/tensorflow/mlir-a-new-intermediate-repres...
- gdubs 7y agoIf you missed it, Chris gave a talk a little while back, and went into detail regarding the motivation behind the project, what Swift provides, etc. It answers a lot of the questions being asked here: https://www.tensorflow.org/swift https://www.tensorflow.org/swift