Skip to content

Commit e864667

Browse files
fix using boost::none as the init value when using paddle::optional (#35215)
1 parent ca4d2fc commit e864667

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

paddle/fluid/framework/details/build_strategy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ struct BuildStrategy {
113113
// Fuse_all_optimizer_ops and fuse_all_reduce_ops require that gradients
114114
// should not be sparse types
115115
paddle::optional<bool> fuse_all_optimizer_ops_{false};
116-
paddle::optional<bool> fuse_all_reduce_ops_{boost::none};
116+
paddle::optional<bool> fuse_all_reduce_ops_{paddle::none};
117117
// fuse_relu_depthwise_conv can fuse the `relu ->
118118
// depthwise_conv`
119119
bool fuse_relu_depthwise_conv_{false};
120120
// NOTE(zcd): In reduce mode, fusing broadcast ops may make the program
121121
// faster. Because fusing broadcast OP equals delaying the execution of all
122122
// broadcast Ops, in this case, all nccl streams are used only for reduce
123123
// operations for a period of time.
124-
paddle::optional<bool> fuse_broadcast_ops_{boost::none};
124+
paddle::optional<bool> fuse_broadcast_ops_{paddle::none};
125125
// replace batch_norm with sync_batch_norm.
126126
bool sync_batch_norm_{false};
127127

@@ -135,7 +135,7 @@ struct BuildStrategy {
135135
// By default, memory_optimize would be opened if gc is disabled, and
136136
// be closed if gc is enabled.
137137
// Users can forcely enable/disable memory_optimize by setting True/False.
138-
paddle::optional<bool> memory_optimize_{boost::none};
138+
paddle::optional<bool> memory_optimize_{paddle::none};
139139

140140
// Turn on inplace by default.
141141
bool enable_inplace_{true};

0 commit comments

Comments
 (0)