Skip to content

Conversation

beauby
Copy link
Contributor

@beauby beauby commented Sep 9, 2020

Stack from ghstack:

  • Introduce buffer.h defining the buffer struct(s). The CpuBuffer
    struct is always defined, while the CudaBuffer struct is defined
    only when TENSORPIPE_SUPPORTS_CUDA is true.
  • Update all channels to take a CpuBuffer or CudaBuffer for
    send/recv rather than a raw pointer and a length.
  • Make the base Channel/Context classes templated on TBuffer,
    effectively creating two channel hierarchies (one for CPU channels,
    one for CUDA channels).
  • Update the Pipe and the generic channel tests to use the new API. So
    far, generic channel tests are CPU only, and tests for the CUDA IPC
    channel are (temporarily) disabled. A subsequent PR will take care of
    refactoring tests so that generic tests work for CUDA channels. An
    other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

[ghstack-poisoned]
@beauby
Copy link
Contributor Author

beauby commented Sep 9, 2020

Note: Preliminary discussion for this happened here.

beauby added a commit to beauby/tensorpipe that referenced this pull request Sep 9, 2020
+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

ghstack-source-id: 132990d
Pull Request resolved: pytorch#212
…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

[ghstack-poisoned]
Copy link
Contributor

@lw lw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a couple of naming discussions I'd like to get resolved. And, as you know, I'd like to see a WIP PR up against PyTorch to see how this new API would look like when used from there.

Also, I found several instances where you used Channel<CpuTensor> instead of CpuChannel: did you not find&replace to substitute them? Could you do so now to make sure I didn't miss any?

@beauby
Copy link
Contributor Author

beauby commented Sep 10, 2020

PR against pytorch: pytorch/pytorch#41475

…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce tensor.h defining the tensor struct(s). The `CpuTensor`
struct is always defined, while the `CudaTensor` struct is defined
only when `TENSORPIPE_HAS_CUDA` is true.
+ Update all channels to take a `CpuTensor` or `CudaTensor` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TTensor`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

…nters."

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: [D23598033](https://our.internmc.facebook.com/intern/diff/D23598033)

[ghstack-poisoned]
@facebook-github-bot
Copy link

@beauby has updated the pull request. You must reimport the pull request before landing.

beauby added a commit to beauby/tensorpipe that referenced this pull request Sep 17, 2020
…orch#212)

Summary:
Pull Request resolved: pytorch#212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: 1c1de3cfb8c492e3e1497db17d7d29fbb1db9161
beauby added a commit to beauby/tensorpipe that referenced this pull request Sep 19, 2020
…014)

Summary:
Pull Request resolved: pytorch/pytorch#45014

Pull Request resolved: pytorch#219

Pull Request resolved: pytorch#212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: a18ca76e1453f2b5d091a2d0103362818eafa028
beauby added a commit to beauby/tensorpipe that referenced this pull request Sep 21, 2020
…014)

Summary:
Pull Request resolved: pytorch/pytorch#45014

Pull Request resolved: pytorch#219

Pull Request resolved: pytorch#212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: 8bd83a8a7e7c2e7d96b4c6025f1238546cdd6222
beauby added a commit to beauby/tensorpipe that referenced this pull request Sep 21, 2020
…014)

Summary:
Pull Request resolved: pytorch/pytorch#45014

Pull Request resolved: pytorch#219

Pull Request resolved: pytorch#212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: 6e66ec1184cd568e99f6d0096d3f88e18e9e5a91
beauby added a commit that referenced this pull request Sep 21, 2020
…014)

Summary:
Pull Request resolved: pytorch/pytorch#45014

Pull Request resolved: #219

Pull Request resolved: #212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: a18ca76e1453f2b5d091a2d0103362818eafa028
beauby added a commit that referenced this pull request Sep 21, 2020
…014)

Summary:
Pull Request resolved: pytorch/pytorch#45014

Pull Request resolved: #219

Pull Request resolved: #212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: a18ca76e1453f2b5d091a2d0103362818eafa028
beauby added a commit to beauby/pytorch that referenced this pull request Sep 21, 2020
…orch#45014)

Summary:
Pull Request resolved: pytorch#45014

Pull Request resolved: pytorch/tensorpipe#219

Pull Request resolved: pytorch/tensorpipe#212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: 7bd0ddbb23b063bc0c436f09c1fac2a875a4f62e
facebook-github-bot pushed a commit to pytorch/pytorch that referenced this pull request Sep 21, 2020
)

Summary:
Pull Request resolved: #45014

Pull Request resolved: pytorch/tensorpipe#219

Pull Request resolved: pytorch/tensorpipe#212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: 1d6c3f91e288420858835cd5e7962e8da051b44b
@facebook-github-bot
Copy link

@beauby merged this pull request in 0956085.

@facebook-github-bot facebook-github-bot deleted the gh/beauby/3/head branch September 25, 2020 14:17
lw pushed a commit that referenced this pull request Sep 20, 2021
…014)

Summary:
Pull Request resolved: pytorch/pytorch#45014

Pull Request resolved: #219

Pull Request resolved: #212

+ Introduce buffer.h defining the buffer struct(s). The `CpuBuffer`
struct is always defined, while the `CudaBuffer` struct is defined
only when `TENSORPIPE_SUPPORTS_CUDA` is true.
+ Update all channels to take a `CpuBuffer` or `CudaBuffer` for
`send`/`recv` rather than a raw pointer and a length.
+ Make the base `Channel`/`Context` classes templated on `TBuffer`,
effectively creating two channel hierarchies (one for CPU channels,
one for CUDA channels).
+ Update the Pipe and the generic channel tests to use the new API. So
far, generic channel tests are CPU only, and tests for the CUDA IPC
channel are (temporarily) disabled. A subsequent PR will take care of
refactoring tests so that generic tests work for CUDA channels. An
other PR will add support for CUDA tensors in the Pipe.

Differential Revision: D23598033

Test Plan: Imported from OSS

Reviewed By: lw

Pulled By: beauby

fbshipit-source-id: 1d6c3f91e288420858835cd5e7962e8da051b44b
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