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

Requesting assistance #1185

Closed
Closed
@philipturner

Description

@philipturner

From @compnerd’s comment in #1184

The project doesn't seem particularly enticing to me - the "rebuilding from the ground up for GPU acceleration through Metal" is a big component of that. If you were designing it for optimization for DCOM+ (DirectX is effective accessed through COM), that might be different. GPU environments are quite fragmented and designing around a particular one is a choice that I do not particularly agree with.

One reason I started this project is I didn’t like that S4TF ran exclusively on CUDA. I planned to bring Metal to it, but I’m open to more platforms. I started trying Swift on Windows, although I couldn't get the REPL to work (even with the workaround @compnerd recently posted). I am interesting in learning DirectX and making a backend for DirectML. I would author it in C++, then bind it to Swift through C at call sites for raw operations.

This also seems very much as other platforms are an afterthought. The overall structure of S4TF is far better from a design standpoint - it generically solves the problem in software and has abstractions over a compilation pipeline to separate the concern of optimization and device/runtime independence.

I read the research paper on S4TF, and I realized that the eager execution model of TensorFlow was much more achievable than what I had planned for DL4S. I then considered using an industry-standard interface like XLA for interfacing with both the Metal and DirectX backends. That investigation led me to greatly appreciate S4TF’s public API. I would rather reuse the code base of S4TF than overhaul DL4S. I have been changing my mind left and right over the past week, so my decision isn’t concrete.

I am considering forking tensorflow/swift-apis and adding the new backends to that project. In addition, I will add iOS/tvOS support by removing the need for a separate Swift toolchain - one of the major reasons @palle-k made DL4S. Differentiation is disabled in Swift’s release build, but I found a short-term workaround by wrapping the Swift standard library’s differentiation directory in a Swift package. Ideally, S4TF 0.14.0 would still work with tensorflow/swift-models and fastai/swiftai without any modifications to those repos. The contributions would be purely additive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions