Skip to content

Commit e41ca2d

Browse files
malfetfacebook-github-bot
authored andcommitted
In copy_weights_to_flat_buf_views() explicitly construct tuple (#43244)
Summary: In some versions of GCC, tuple constructor from initializer list is marked as explicit, which results in the following compilation error: ``` /var/lib/jenkins/workspace/aten/src/ATen/native/cudnn/RNN.cpp: In function 'std::tuple<at::Tensor, std::vector<at::Tensor, std::allocator<at::Tensor> > > at::native::cudnn_rnn::copy_weights_to_flat_buf_views(at::TensorList, int64_t, int64_t, int64_t, int64_t, int64_t, bool, bool, cudnnDataType_t, const c10::TensorOptions&, bool, bool, bool)': /var/lib/jenkins/workspace/aten/src/ATen/native/cudnn/RNN.cpp:687:35: error: converting to 'std::tuple<at::Tensor, std::vector<at::Tensor, std::allocator<at::Tensor> > >' from initializer list would use explicit constructor 'constexpr std::tuple<_T1, _T2>::tuple(_U1&&, _U2&&) [with _U1 = at::Tensor&; _U2 = std::vector<at::Tensor>&; <template-parameter-2-3> = void; _T1 = at::Tensor; _T2 = std::vector<at::Tensor>]' return {weight_buf, params_arr}; ``` This regression was introduced by #42385 Fixes #{issue number} Pull Request resolved: #43244 Reviewed By: pbelevich Differential Revision: D23205656 Pulled By: malfet fbshipit-source-id: 51470386ad95290c7c99d733fc1fe655aa27d009
1 parent d06f181 commit e41ca2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aten/src/ATen/native/cudnn/RNN.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ namespace cudnn_rnn {
684684
}
685685
}
686686

687-
return {weight_buf, params_arr};
687+
return std::make_tuple(weight_buf, params_arr);
688688
}
689689

690690
} // namespace cudnn_rnn

0 commit comments

Comments
 (0)