未验证 提交 6179a3ec 编写于 作者: G Galaxy1458 提交者: GitHub

test,test=develop (#53931)

上级 63ffd733
...@@ -16,12 +16,14 @@ ...@@ -16,12 +16,14 @@
namespace phi { namespace phi {
KernelSignature NormOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature NormOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature( return KernelSignature(
"norm", {"X"}, {"axis", "epsilon", "is_test"}, {"Out", "Norm"}); "norm", {"X"}, {"axis", "epsilon", "is_test"}, {"Out", "Norm"});
} }
KernelSignature NormGradOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature NormGradOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("norm_grad", return KernelSignature("norm_grad",
{"X", "Norm", "Out@GRAD"}, {"X", "Norm", "Out@GRAD"},
{"axis", "epsilon", "is_test"}, {"axis", "epsilon", "is_test"},
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
namespace phi { namespace phi {
KernelSignature PSendOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature PSendOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("p_send", {"x"}, {"peer", "dynamic_shape"}, {}); return KernelSignature("p_send", {"x"}, {"peer", "dynamic_shape"}, {});
} }
......
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
namespace phi { namespace phi {
KernelSignature PadGradOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature PadGradOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature( return KernelSignature(
"pad_grad", {"Out@GRAD"}, {"paddings", "pad_value"}, {"X@GRAD"}); "pad_grad", {"Out@GRAD"}, {"paddings", "pad_value"}, {"X@GRAD"});
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
namespace phi { namespace phi {
KernelSignature PixelUnshuffleGradOpArgumentMapping( KernelSignature PixelUnshuffleGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("pixel_unshuffle_grad", return KernelSignature("pixel_unshuffle_grad",
{"Out@GRAD"}, {"Out@GRAD"},
{"downscale_factor", "data_format"}, {"downscale_factor", "data_format"},
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
namespace phi { namespace phi {
KernelSignature Pool2dOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature Pool2dOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("pool2d", return KernelSignature("pool2d",
{"X"}, {"X"},
{"ksize", {"ksize",
...@@ -32,7 +33,8 @@ KernelSignature Pool2dOpArgumentMapping(const ArgumentMappingContext& ctx) { ...@@ -32,7 +33,8 @@ KernelSignature Pool2dOpArgumentMapping(const ArgumentMappingContext& ctx) {
{"Out"}); {"Out"});
} }
KernelSignature Pool2dGradOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature Pool2dGradOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("pool2d_grad", return KernelSignature("pool2d_grad",
{"X", "Out", "Out@GRAD"}, {"X", "Out", "Out@GRAD"},
{"ksize", {"ksize",
...@@ -49,7 +51,7 @@ KernelSignature Pool2dGradOpArgumentMapping(const ArgumentMappingContext& ctx) { ...@@ -49,7 +51,7 @@ KernelSignature Pool2dGradOpArgumentMapping(const ArgumentMappingContext& ctx) {
} }
KernelSignature Pool2dDoubleGradOpArgumentMapping( KernelSignature Pool2dDoubleGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("pool2d_double_grad", return KernelSignature("pool2d_double_grad",
{"X"}, {"X"},
{"ksize", {"ksize",
...@@ -65,7 +67,8 @@ KernelSignature Pool2dDoubleGradOpArgumentMapping( ...@@ -65,7 +67,8 @@ KernelSignature Pool2dDoubleGradOpArgumentMapping(
{"Out"}); {"Out"});
} }
KernelSignature Pool3dOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature Pool3dOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("pool3d", return KernelSignature("pool3d",
{"X"}, {"X"},
{"ksize", {"ksize",
...@@ -81,7 +84,8 @@ KernelSignature Pool3dOpArgumentMapping(const ArgumentMappingContext& ctx) { ...@@ -81,7 +84,8 @@ KernelSignature Pool3dOpArgumentMapping(const ArgumentMappingContext& ctx) {
{"Out"}); {"Out"});
} }
KernelSignature Pool3dGradOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature Pool3dGradOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("pool3d_grad", return KernelSignature("pool3d_grad",
{"X", "Out", "Out@GRAD"}, {"X", "Out", "Out@GRAD"},
{"ksize", {"ksize",
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
namespace phi { namespace phi {
KernelSignature Pow2DecayWithLinearWarmupOpArgumentMapping( KernelSignature Pow2DecayWithLinearWarmupOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("pow2_decay_with_linear_warmup", return KernelSignature("pow2_decay_with_linear_warmup",
{"LearningRate", "Step"}, {"LearningRate", "Step"},
{"warmup_steps", "total_steps", "base_lr", "end_lr"}, {"warmup_steps", "total_steps", "base_lr", "end_lr"},
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
namespace phi { namespace phi {
KernelSignature PriorBoxOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature PriorBoxOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("prior_box", return KernelSignature("prior_box",
{"Input", "Image"}, {"Input", "Image"},
{"min_sizes", {"min_sizes",
......
...@@ -25,7 +25,7 @@ KernelSignature PsroiPoolOpArgumentMapping(const ArgumentMappingContext& ctx) { ...@@ -25,7 +25,7 @@ KernelSignature PsroiPoolOpArgumentMapping(const ArgumentMappingContext& ctx) {
} }
KernelSignature PsroiPoolGradOpArgumentMapping( KernelSignature PsroiPoolGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature( return KernelSignature(
"psroi_pool_grad", "psroi_pool_grad",
{"X", "ROIs", "RoisNum", "Out@GRAD"}, {"X", "ROIs", "RoisNum", "Out@GRAD"},
......
...@@ -160,7 +160,7 @@ KernelSignature ReduceAllOpArgumentMapping(const ArgumentMappingContext& ctx) { ...@@ -160,7 +160,7 @@ KernelSignature ReduceAllOpArgumentMapping(const ArgumentMappingContext& ctx) {
} }
KernelSignature ReduceSumGradOpArgumentMapping( KernelSignature ReduceSumGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("sum_grad", return KernelSignature("sum_grad",
{"X", "Out@GRAD"}, {"X", "Out@GRAD"},
{"dim", "keep_dim", "reduce_all"}, {"dim", "keep_dim", "reduce_all"},
...@@ -168,7 +168,7 @@ KernelSignature ReduceSumGradOpArgumentMapping( ...@@ -168,7 +168,7 @@ KernelSignature ReduceSumGradOpArgumentMapping(
} }
KernelSignature ReduceMeanGradOpArgumentMapping( KernelSignature ReduceMeanGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("mean_grad", return KernelSignature("mean_grad",
{"X", "Out@GRAD"}, {"X", "Out@GRAD"},
{"dim", "keep_dim", "reduce_all"}, {"dim", "keep_dim", "reduce_all"},
...@@ -176,7 +176,7 @@ KernelSignature ReduceMeanGradOpArgumentMapping( ...@@ -176,7 +176,7 @@ KernelSignature ReduceMeanGradOpArgumentMapping(
} }
KernelSignature ReduceMaxGradOpArgumentMapping( KernelSignature ReduceMaxGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("max_grad", return KernelSignature("max_grad",
{"X", "Out", "Out@GRAD"}, {"X", "Out", "Out@GRAD"},
{"dim", "keep_dim", "reduce_all"}, {"dim", "keep_dim", "reduce_all"},
...@@ -184,7 +184,7 @@ KernelSignature ReduceMaxGradOpArgumentMapping( ...@@ -184,7 +184,7 @@ KernelSignature ReduceMaxGradOpArgumentMapping(
} }
KernelSignature ReduceAMaxGradOpArgumentMapping( KernelSignature ReduceAMaxGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("amax_grad", return KernelSignature("amax_grad",
{"X", "Out", "Out@GRAD"}, {"X", "Out", "Out@GRAD"},
{"dim", "keep_dim", "reduce_all"}, {"dim", "keep_dim", "reduce_all"},
...@@ -192,7 +192,7 @@ KernelSignature ReduceAMaxGradOpArgumentMapping( ...@@ -192,7 +192,7 @@ KernelSignature ReduceAMaxGradOpArgumentMapping(
} }
KernelSignature ReduceMinGradOpArgumentMapping( KernelSignature ReduceMinGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("min_grad", return KernelSignature("min_grad",
{"X", "Out", "Out@GRAD"}, {"X", "Out", "Out@GRAD"},
{"dim", "keep_dim", "reduce_all"}, {"dim", "keep_dim", "reduce_all"},
...@@ -200,7 +200,7 @@ KernelSignature ReduceMinGradOpArgumentMapping( ...@@ -200,7 +200,7 @@ KernelSignature ReduceMinGradOpArgumentMapping(
} }
KernelSignature ReduceAMinGradOpArgumentMapping( KernelSignature ReduceAMinGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("amin_grad", return KernelSignature("amin_grad",
{"X", "Out", "Out@GRAD"}, {"X", "Out", "Out@GRAD"},
{"dim", "keep_dim", "reduce_all"}, {"dim", "keep_dim", "reduce_all"},
...@@ -208,7 +208,7 @@ KernelSignature ReduceAMinGradOpArgumentMapping( ...@@ -208,7 +208,7 @@ KernelSignature ReduceAMinGradOpArgumentMapping(
} }
KernelSignature ReduceProdGradOpArgumentMapping( KernelSignature ReduceProdGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("prod_grad", return KernelSignature("prod_grad",
{"X", "Out", "Out@GRAD"}, {"X", "Out", "Out@GRAD"},
{"dim", "keep_dim", "reduce_all"}, {"dim", "keep_dim", "reduce_all"},
......
...@@ -38,12 +38,12 @@ KernelSignature ReshapeOpArgumentMapping(const ArgumentMappingContext& ctx) { ...@@ -38,12 +38,12 @@ KernelSignature ReshapeOpArgumentMapping(const ArgumentMappingContext& ctx) {
} }
KernelSignature ReshapeGradOpArgumentMapping( KernelSignature ReshapeGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("reshape_grad", {"Out@GRAD"}, {}, {"X@GRAD"}); return KernelSignature("reshape_grad", {"Out@GRAD"}, {}, {"X@GRAD"});
} }
KernelSignature ReshapeDoubleGradOpArgumentMapping( KernelSignature ReshapeDoubleGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("reshape_double_grad", {"DOut", "DDX"}, {}, {"DDOut"}); return KernelSignature("reshape_double_grad", {"DOut", "DDX"}, {}, {"DDOut"});
} }
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
namespace phi { namespace phi {
KernelSignature RoiAlignOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature RoiAlignOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("roi_align", return KernelSignature("roi_align",
{"X", "ROIs", "RoisNum"}, {"X", "ROIs", "RoisNum"},
{"pooled_height", {"pooled_height",
...@@ -28,7 +29,7 @@ KernelSignature RoiAlignOpArgumentMapping(const ArgumentMappingContext& ctx) { ...@@ -28,7 +29,7 @@ KernelSignature RoiAlignOpArgumentMapping(const ArgumentMappingContext& ctx) {
} }
KernelSignature RoiAlignGradOpArgumentMapping( KernelSignature RoiAlignGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("roi_align_grad", return KernelSignature("roi_align_grad",
{"X", "ROIs", "RoisNum", "Out@GRAD"}, {"X", "ROIs", "RoisNum", "Out@GRAD"},
{"pooled_height", {"pooled_height",
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
namespace phi { namespace phi {
KernelSignature RoiPoolOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature RoiPoolOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("roi_pool", return KernelSignature("roi_pool",
{"X", "ROIs", "RoisNum"}, {"X", "ROIs", "RoisNum"},
{"pooled_height", "pooled_width", "spatial_scale"}, {"pooled_height", "pooled_width", "spatial_scale"},
...@@ -24,7 +25,7 @@ KernelSignature RoiPoolOpArgumentMapping(const ArgumentMappingContext& ctx) { ...@@ -24,7 +25,7 @@ KernelSignature RoiPoolOpArgumentMapping(const ArgumentMappingContext& ctx) {
} }
KernelSignature RoiPoolOpGradArgumentMapping( KernelSignature RoiPoolOpGradArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("roi_pool_grad", return KernelSignature("roi_pool_grad",
{"X", "ROIs", "RoisNum", "Argmax", "Out@GRAD"}, {"X", "ROIs", "RoisNum", "Argmax", "Out@GRAD"},
{"pooled_height", "pooled_width", "spatial_scale"}, {"pooled_height", "pooled_width", "spatial_scale"},
......
...@@ -16,13 +16,14 @@ ...@@ -16,13 +16,14 @@
namespace phi { namespace phi {
KernelSignature RReluOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature RReluOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature( return KernelSignature(
"rrelu", {"X"}, {"lower", "upper", "is_test"}, {"Out", "Noise"}); "rrelu", {"X"}, {"lower", "upper", "is_test"}, {"Out", "Noise"});
} }
KernelSignature RReluGradGradOpArgumentMapping( KernelSignature RReluGradGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature( return KernelSignature(
"rrelu_grad", {"X", "Noise", "Out@GRAD"}, {}, {"X@GRAD"}); "rrelu_grad", {"X", "Noise", "Out@GRAD"}, {}, {"X@GRAD"});
} }
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
namespace phi { namespace phi {
KernelSignature SequenceMaskOpArgumentMapping( KernelSignature SequenceMaskOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature( return KernelSignature(
"sequence_mask", {"X", "MaxLenTensor"}, {"maxlen", "out_dtype"}, {"Y"}); "sequence_mask", {"X", "MaxLenTensor"}, {"maxlen", "out_dtype"}, {"Y"});
} }
......
...@@ -14,7 +14,7 @@ limitations under the License. */ ...@@ -14,7 +14,7 @@ limitations under the License. */
namespace phi { namespace phi {
KernelSignature SequencePoolOpArgumentMapping( KernelSignature SequencePoolOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("sequence_pool", return KernelSignature("sequence_pool",
{"X"}, {"X"},
{"is_test", "pooltype", "pad_value"}, {"is_test", "pooltype", "pad_value"},
...@@ -22,7 +22,7 @@ KernelSignature SequencePoolOpArgumentMapping( ...@@ -22,7 +22,7 @@ KernelSignature SequencePoolOpArgumentMapping(
} }
KernelSignature SequencePoolGradOpArgumentMapping( KernelSignature SequencePoolGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("sequence_pool_grad", return KernelSignature("sequence_pool_grad",
{"X", "MaxIndex", "Out@GRAD"}, {"X", "MaxIndex", "Out@GRAD"},
{"is_test", "pooltype", "pad_value"}, {"is_test", "pooltype", "pad_value"},
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
namespace phi { namespace phi {
KernelSignature SyncBatchNormOpArgumentMapping( KernelSignature SyncBatchNormOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("sync_batch_norm", return KernelSignature("sync_batch_norm",
{"X", "Mean", "Variance", "Scale", "Bias"}, {"X", "Mean", "Variance", "Scale", "Bias"},
{"is_test", {"is_test",
...@@ -35,7 +35,7 @@ KernelSignature SyncBatchNormOpArgumentMapping( ...@@ -35,7 +35,7 @@ KernelSignature SyncBatchNormOpArgumentMapping(
} }
KernelSignature SyncBatchNormGradOpArgumentMapping( KernelSignature SyncBatchNormGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("sync_batch_norm_grad", return KernelSignature("sync_batch_norm_grad",
{ {
"X", "X",
......
...@@ -16,12 +16,13 @@ ...@@ -16,12 +16,13 @@
namespace phi { namespace phi {
KernelSignature TransposeOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature TransposeOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("transpose", {"X"}, {"axis"}, {"Out"}); return KernelSignature("transpose", {"X"}, {"axis"}, {"Out"});
} }
KernelSignature TransposeGradOpArgumentMapping( KernelSignature TransposeGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("transpose_grad", {"Out@GRAD"}, {"axis"}, {"X@GRAD"}); return KernelSignature("transpose_grad", {"Out@GRAD"}, {"axis"}, {"X@GRAD"});
} }
......
...@@ -16,12 +16,13 @@ limitations under the License. */ ...@@ -16,12 +16,13 @@ limitations under the License. */
namespace phi { namespace phi {
KernelSignature TrilTriuOpArgumentMapping(const ArgumentMappingContext& ctx) { KernelSignature TrilTriuOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature("tril_triu", {"X"}, {"diagonal", "lower"}, {"Out"}); return KernelSignature("tril_triu", {"X"}, {"diagonal", "lower"}, {"Out"});
} }
KernelSignature TrilTriuGradOpArgumentMapping( KernelSignature TrilTriuGradOpArgumentMapping(
const ArgumentMappingContext& ctx) { const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature( return KernelSignature(
"tril_triu_grad", {"Out@GRAD"}, {"diagonal", "lower"}, {"X@GRAD"}); "tril_triu_grad", {"Out@GRAD"}, {"diagonal", "lower"}, {"X@GRAD"});
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/core/kernel_registry.h"
#include "paddle/phi/kernels/declarations.h" #include "paddle/phi/kernels/declarations.h"
int main(int argc, char** argv) { int main(int argc UNUSED, char** argv UNUSED) {
std::cout << phi::KernelFactory::Instance() << std::endl; std::cout << phi::KernelFactory::Instance() << std::endl;
return 0; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册