Skip to content

Commit 91706d3

Browse files
[cherry-pick] Fix windows build no kernel issue, test=develop (#22105) (#22184)
windows conv_fusion failed as no kernel, explicit declare lambda Signed-off-by: zhaoyuchen <[email protected]>
1 parent bc385a2 commit 91706d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

paddle/fluid/operators/conv_fusion_op.cu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15+
#include <array>
1516
#include "paddle/fluid/framework/op_registry.h"
16-
#include "paddle/fluid/operators/conv_cudnn_helper.h"
1717
#include "paddle/fluid/operators/conv_cudnn_op_cache.h"
1818
#include "paddle/fluid/operators/conv_op.h"
1919
#include "paddle/fluid/operators/math/padding.h"
@@ -208,7 +208,8 @@ class CUDNNConvFusionOpKernel : public framework::OpKernel<T> {
208208
workspace_size_limit, &algo));
209209
VLOG(3) << "cuDNN forward algo " << algo;
210210
} else {
211-
auto search_func = [&]() {
211+
std::function<cudnnConvolutionFwdAlgo_t()> search_func =
212+
[&]() -> cudnnConvolutionFwdAlgo_t {
212213
int returned_algo_count;
213214
std::array<cudnnConvolutionFwdAlgoPerf_t, kNUM_CUDNN_FWD_ALGS>
214215
fwd_perf_stat;

0 commit comments

Comments
 (0)