|
|
|
|
|
by codesushi42
2547 days ago
|
|
That doesn't really make sense. The code you implement in Swift when in Jupyter needs to also be available at runtime to execute. Meaning you can do the exact same thing in Python, because your model architecture is going to be embedded in the exported model. For custom kernel code, what you really want to use is a custom TF op. But I doubt that's what you're getting at anyway, because that's for more advanced use cases. |
|
Edit: HN isn't letting me reply deeper, so I'll reply to "what are the benefits over C++?" here. The first is that MLIR has dialects that support stuff like polyhedral compilation, which result in much more concise and understandable code, which is often faster too. The second is that using the same language from top to bottom means you can profile/debug/etc your code in one place, which is much more efficient. And you don't have to learn two languages. And you don't have to use C++, which (for me at least) is a big win! ;)