Skip to content

Support Loading to GPU#10710

Closed
xush6528 wants to merge 1 commit intopytorch:masterfrom
xush6528:export-D9372950
Closed

Support Loading to GPU#10710
xush6528 wants to merge 1 commit intopytorch:masterfrom
xush6528:export-D9372950

Conversation

@xush6528
Copy link
Contributor

Summary:
Can't resume from checkpoint for workflows that use GPU.

The problem is just we didn't leverage the already-provided GPU deserialization of Caffe2.

keep_device arg of LoadOp. See https://fburl.com/y27ltaxw

How a serialized BlobProto (contraining TensorProto) is loaded into GPU memory?

Cloned the GPU workflows for testing in D9125520.

Differential Revision: D9372950

Summary:
Pull Request resolved: #10710

Can't resume from checkpoint for workflows that use GPU.

The problem is just we didn't leverage the already-provided GPU deserialization of Caffe2.

`keep_device` arg of LoadOp. See https://fburl.com/y27ltaxw

How a serialized BlobProto (contraining TensorProto) is loaded into GPU memory?
- Load BlobProto from DB. https://fburl.com/pe1qaeyf
- Deserialize the BlobProto into a Blob instance. https://fburl.com/5dirjuuh and https://fburl.com/stoho0x1
- Call Blob->Deserialized. https://fburl.com/bnureu32
- Deserializer Registration. https://fburl.com/wbu95ry7 https://fburl.com/ycetud8u
- Create TensorCUDA Deserializer. https://fburl.com/2lirfuqj
- Create Tensor on GPU and get TensorProto of BlobProto. https://fburl.com/7dre82zg
- Copy TensorProto in CPU to Tensor on GPU. https://fburl.com/fr0qk2oe

Cloned the GPU workflows for testing in D9125520.

Differential Revision: D9372950

fbshipit-source-id: d8cb72608a8b7174e8763ee4c74428297a1cb99b
@zou3519 zou3519 added the caffe2 label Aug 21, 2018
petrex pushed a commit to petrex/pytorch that referenced this pull request Aug 21, 2018
* upstream/master: (147 commits)
  Support Loading to GPU (pytorch#10710)
  More changes for hidden visibility (pytorch#10692)
  Add arguments __repr__ in Distribution base class
  Add util function from core type to dtype (pytorch#10716)
  Make ONNX_ATEN_FALLBACK as internal default option
  Set the BUILD_ENVIRONMENT variable before installing sccache. (pytorch#10640)
  Avoid shadowing i, j vars in GeneralProposals test (pytorch#10721)
  Move THNN Reduction to ATen/core. (pytorch#10703)
  Completely remove build_aten and use_aten (pytorch#10469)
  Make empty list literals construct empty Tensor[] (pytorch#10705)
  Soumith's last few patches to v0.4.1
  Fix issues link in Caffe2 readme (pytorch#10711)
  Update the onnx Gemm op to FC/FCTransposed logic in caffe2 onnx backend (pytorch#10108)
  Adding ATEN_NO_TEST option to root level cmake for propogation to aten
  Allow method-style casts on tensors (pytorch#10641)
  Fix pytorch#10698 build failure (pytorch#10704)
  Add support for Log()
  Add a bisect percentile operator (pytorch#10563)
  Fix EnsureCPUOutputOp (pytorch#10651)
  Nomnigraph - rename some APIs that invole Subtree to Subgraph (pytorch#10551)
  ...
PenghuiCheng pushed a commit to PenghuiCheng/pytorch that referenced this pull request Sep 11, 2018
Summary:
Pull Request resolved: pytorch#10710

Can't resume from checkpoint for workflows that use GPU.

The problem is just we didn't leverage the already-provided GPU deserialization of Caffe2.

`keep_device` arg of LoadOp. See https://fburl.com/y27ltaxw

How a serialized BlobProto (contraining TensorProto) is loaded into GPU memory?
- Load BlobProto from DB. https://fburl.com/pe1qaeyf
- Deserialize the BlobProto into a Blob instance. https://fburl.com/5dirjuuh and https://fburl.com/stoho0x1
- Call Blob->Deserialized. https://fburl.com/bnureu32
- Deserializer Registration. https://fburl.com/wbu95ry7 https://fburl.com/ycetud8u
- Create TensorCUDA Deserializer. https://fburl.com/2lirfuqj
- Create Tensor on GPU and get TensorProto of BlobProto. https://fburl.com/7dre82zg
- Copy TensorProto in CPU to Tensor on GPU. https://fburl.com/fr0qk2oe

Cloned the GPU workflows for testing in D9125520.

Reviewed By: mraway

Differential Revision: D9372950

fbshipit-source-id: 2bf70747bd71e8da16239197f7d2761d63f09ff8
@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants