pytorch/test/cpp/rpc
Lucas Hosseini c618dc13d2 Use type-erased union for Buffer. (#322)
Summary:
Pull Request resolved: https://github.com/pytorch/tensorpipe/pull/322

Pull Request resolved: https://github.com/pytorch/pytorch/pull/54145

In order to merge the channel hierarchies, we need a generic `Buffer` type, that can wrap either a `CpuBuffer` or a `CudaBuffer`.
The constraints are that, since this type is used by the channels, it cannot explicitly refer to `CudaBuffer`. We propose here a type-erasure based solution, with small-buffer optimization to avoid heap-allocating the wrapped concrete buffer.
ghstack-source-id: 124131499

Test Plan: CI

Reviewed By: lw

Differential Revision: D27001339

fbshipit-source-id: 26d7dc19d69d7e3336df6fd4ff6ec118dc17c5b6
2021-03-18 02:23:17 -07:00
..
CMakeLists.txt fix tensorpipe_agent linked even when USE_TENSORPIPE is turned off (#53281) 2021-03-04 13:29:27 -08:00
e2e_test_base.cpp
e2e_test_base.h
test_e2e_process_group.cpp [distributed] add base processgroup::options (#53662) 2021-03-17 18:40:04 -07:00
test_e2e_tensorpipe.cpp [distributed] add base processgroup::options (#53662) 2021-03-17 18:40:04 -07:00
test_tensorpipe_serialization.cpp Use type-erased union for Buffer. (#322) 2021-03-18 02:23:17 -07:00
test_wire_serialization.cpp