Skip to content

Commit 935e645

Browse files
committed
refine code comments and add TODO list
1 parent e162c74 commit 935e645

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

paddle/framework/tensor.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,13 @@ class Tensor {
8989
*
9090
* @param[in] src The external tensor.
9191
* @param[in] dst_place The dst place.
92-
* @param[in] ctx The device context contains CUDA stream.
92+
* @param[in] ctx The device context contains device resources.
9393
*
9494
* @note CopyFrom supports CPU <-> GPU, GPU <-> GPU.
9595
*/
96+
// TODO(qijun): https://github.com/PaddlePaddle/Paddle/issues/4647
97+
// Remove `CopyFrom` and `CopyFromVector` from Tensor interface
98+
// and make them global functions
9699
template <typename T>
97100
inline void CopyFrom(const Tensor& src, const platform::Place& dst_place,
98101
const platform::DeviceContext& ctx);
@@ -101,7 +104,7 @@ class Tensor {
101104
* @brief Copy the content of an external vector to a tensor.
102105
*
103106
* @param[in] src The external tensor.
104-
* @param[in] ctx The device context contains CUDA stream.
107+
* @param[in] ctx The device context contains device resources.
105108
*
106109
* * @note CopyFromVector assumes that the tensor has been resized
107110
* before invoking.

0 commit comments

Comments
 (0)