pytorch / pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

Home Page:https://pytorch.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[devs] some workflow changes...

soumith opened this issue · comments

If you follow PyTorch development closely (maintainers, core-devs, folks sending PRs), you may have noticed a few things in the past few months:

  • PyTorch and Caffe2 now share a CI which was significant engineering work
  • PyTorch and PyTorch-ONNX have a very complicated CI -- onnxbot triggers builds on each PyTorch PR and updates the PyTorch PR status in a roundabout way
  • There's been backend work in a "pending" state, such as integrating with the latest and greatest libraries (MKLDNN, cuFFT, more NNPACK coverage, etc. etc.)

As maintainers of PyTorch and Caffe2 frameworks, it kinda made sense to share engineering that is common across both, such as operator libraries.

However, sharing code across two separate github repos is a challenge (submodules or subtrees dont cut it, Continuous Integration becomes hard, etc.).

As a step in this line of collaboration and thinking, we are merging the Caffe2 repo into the PyTorch github, i.e. if you git clone https://github.com/pytorch/pytorch, you will see some caffe2 bits there.

As a PyTorch user, here's what you need to know:

  • Nothing changes for you. PyTorch is installed, shipped and used exactly how it is done today.

Does this mean that my code will break?

No, your code will not break. This is development and backend work. If you are not a core-developer, this issue is not even that relevant for you.

Will this mean I have to deal with protobuf?

No, if you are a user nothing changes.

Does this mean ATen is being replaced?

No, ATen will be here for a while. When we share code for operators, it will be under the ATen level.

reference: facebookarchive/caffe2#2439

"we are merging the Caffe2 repo into the PyTorch github"

Some questions as a user:

  1. Does it mean the Caffe2 codebase will be merged into the pytorch repo?

  2. So I will be able to compile Caffe2 from pytorch repo?

  1. Yes. So if you checkout pytorch, you'll get all the caffe2 bits

  2. Yes, although not by default at the moment (so if you run python setup.py install, it will still be a PyTorch only build, not Caffe2, until more bits and pieces are shared.)

I have one question as a user:

Will PyTorch package come to us with Caffe2 via conda or pip?
Or can we install them as separate, independent packages?

You will still be able to install them as separate packages

Is this a step closer to provide serving models?

Reading facebookarchive/caffe2#2439 (comment), It sounds like there is an intention to migrate the backend of pytorch to Caffe2. Am I reading that correctly? If so, what is happening to the torch backend? Are there any plans for maintaining the C-API or extern-ing the C++ interface for anyone who is trying to access the ATen backend through FFI calls?

Sam, no you've over-read it :) I dont see such commentary on the original thread. What exact parts in the original comment thread made you get there?

Also, the pytorch backend (if you noticed) is relying more and more on ATen and less and less on TH per-se. See ATen/native for example. So We dont plan to commit to maintaining the C-API which is TH / THC.

However, if I manage to convince everyone that it's a good idea, there will be an autogenerated C API from ATen.

I agree with Edward (@ezyang). That would be a really valuable work.

So is it possible to directly deploy model with PyTorch in future, say on mobile?

@soumith Yup, definitely got a bit too caught in the weeds then. I read the first question-response as "is pytorch moving to caffe" instead of "is caffe's python client now pytorch." The wording was a tad ambiguous.

RE: the C-API. I'm a huge fan since the haskell bindings are now code-complete, but have no future without this.