# Copyright 2023 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================

"""Operator labels and args default value."""
from mindspore.common import dtype as mstype

op_args_default_value = {
    "AdamWeightDecay": {"use_locking": False},
    "AdamW": {"amsgrad": False, "maximize": False},
    "AddExt": {"alpha": 1},
    "AddLayerNormV2": {"epsilon": 1e-5, "additionalOut": False},
    "ApplyAdamW": {"max_grad_norm": None, "amsgrad": False, "maximize": False},
    "ApplyCamePart2": {"sum_r": None, "global_shape": None},
    "ApplyCamePart3": {"global_shape": None, "use_first_moment": False},
    "ApplyCamePart4": {"global_shape": None},
    "ApplyRotaryPosEmb": {"cos_format": 0},
    "Arange": {"dtype": None},
    "ArgMaxExt": {"dim": None, "keepdim": False},
    "Argmax": {"axis": -1, "output_type": mstype.int32},
    "ArgMaxWithValue": {"axis": 0, "keep_dims": False},
    "ArgMinExt": {"dim": None, "keepdim": False},
    "Argmin": {"axis": -1, "output_type": mstype.int32},
    "ArgMinWithValue": {"axis": 0, "keep_dims": False},
    "AvgPool2DGrad": {"padding": 0, "ceil_mode": False, "count_include_pad": True, "divisor_override": None},
    "AvgPool2D": {"padding": 0, "ceil_mode": False, "count_include_pad": True, "divisor_override": None},
    "AvgPoolGrad": {"kernel_size": 1, "strides": 1, "pad_mode": 'VALID', "data_format": 'NCHW'},
    "AvgPool": {"kernel_size": 1, "strides": 1, "pad_mode": 'VALID', "data_format": 'NCHW'},
    "BatchMatMul": {"transpose_a": False, "transpose_b": False},
    "BatchNormExt": {"running_mean": None, "runnning_var": None, "training": False, "momentum": 0.1, "epsilon": 1e-5},
    "BatchNormGradExt": {"running_mean": None, "running_var": None, "saved_mean": None, "saved_rstd": None, "training": False, "eps": 1e-5},
    "BatchNormGradGrad": {"is_training": False, "epsilon": 1e-5, "data_format": 'NCHW'},
    "BatchNormGrad": {"is_training": False, "epsilon": 1e-5, "data_format": 'NCHW'},
    "BatchNormGradWithActivation": {"is_training": False, "epsilon": 1e-5, "data_format": 'NCHW'},
    "BatchNorm": {"is_training": False, "epsilon": 1e-5, "momentum": 0.1, "data_format": 'NCHW'},
    "BatchNormWithActivation": {"is_training": False, "epsilon": 1e-5, "momentum": 0.1, "data_format": 'NCHW'},
    "BatchNormWithAddAndActivation": {"is_training": False, "epsilon": 1e-5, "momentum": 0.1, "data_format": 'NCHW'},
    "BiasAddGrad": {"data_format": 'NCHW'},
    "BiasAdd": {"data_format": 'NCHW'},
    "BinaryCrossEntropyGrad": {"weight": None, "reduction": 'mean'},
    "BinaryCrossEntropy": {"weight": None, "reduction": 'mean'},
    "BinaryCrossEntropyWithLogitsBackward": {"weight": None, "posWeight": None, "reduction": 'mean'},
    "BCEWithLogitsLoss": {"weight": None, "posWeight": None, "reduction": 'mean'},
    "CeLU": {"alpha": 1.0},
    "CholeskyInverse": {"upper": False},
    "Cholesky": {"upper": False},
    "Chunk": {"dim": 0},
    "ClampScalar": {"min": None, "max": None},
    "ClampTensor": {"min": None, "max": None},
    "Col2ImExt": {"dilation": 1, "padding": 0, "stride": 1},
    "Col2ImGrad": {"dilation": 1, "padding": 0, "stride": 1},
    "Concat": {"axis": 0},
    "ConstantPadND": {"value": 0.0},
    "ConvolutionGrad": {"bias": None, "stride": 1, "padding": 0, "dilation": 1, "transposed": False, "output_padding": 0, "groups": 1, "output_mask": ()},
    "Convolution": {"bias": None, "stride": 1, "padding": 0, "dilation": 1, "transposed": False, "output_padding": 0, "groups": 1},
    "Correlate": {"mode": 'valid'},
    "CountNonZero": {"dim": None},
    "Cross": {"dim": -65530},
    "CumProd": {"exclusive": False, "reverse": False},
    "CumSum": {"exclusive": False, "reverse": False},
    "CumsumExt": {"dtype": None},
    "DCT": {"type": 2, "n": None, "axis": -1, "norm": None},
    "DCTN": {"type": 2, "s": None, "axes": None, "norm": None},
    "Dense": {"bias": None},
    "Diagonal": {"offset": 0, "dim1": 0, "dim2": 1},
    "DivMod": {"rounding_mode": None},
    "Dropout": {"keep_prob": 0.5, "Seed0": 0, "Seed1": 0},
    "Eig": {"compute_v": False},
    "EluExt": {"alpha": 1.0},
    "EluGradExt": {"alpha": 1.0},
    "Elu": {"alpha": 1.0},
    "EmbeddingApplyAdaGrad": {"mask_zero": (0,), "padding_key": (0,), "padding_key_mask": (1,), "completion_key": (0,), "completion_key_mask": (1,), "_embedding_dim": 1, "_max_key_num": 1},
    "EmbeddingApplyAdam": {"mask_zero": (0,), "padding_key": (0,), "padding_key_mask": (1,), "completion_key": (0,), "completion_key_mask": (1,), "_embedding_dim": 1, "_max_key_num": 1},
    "EmbeddingApplyAdamW": {"ams_grad": (0,), "mask_zero": (0,), "padding_key": (0,), "padding_key_mask": (1,), "completion_key": (0,), "completion_key_mask": (1,), "_embedding_dim": 1, "_max_key_num": 1},
    "EmbeddingApplyFtrl": {"mask_zero": (0,), "padding_key": (0,), "padding_key_mask": (1,), "completion_key": (0,), "completion_key_mask": (1,), "_embedding_dim": 1, "_max_key_num": 1},
    "EmbeddingApplyRmsprop": {"mask_zero": (0,), "padding_key": (0,), "padding_key_mask": (1,), "completion_key": (0,), "completion_key_mask": (1,), "_embedding_dim": 1, "_max_key_num": 1},
    "EmbeddingApplySgd": {"mask_zero": (0,), "padding_key": (0,), "padding_key_mask": (1,), "completion_key": (0,), "completion_key_mask": (1,), "_embedding_dim": 1, "_max_key_num": 1},
    "EmbeddingDenseBackward": {"padding_idx": None, "scale_grad_by_freq": False},
    "EmbeddingFeatureMappingFileSize": {"only_offset_flag": True},
    "EmbeddingFeatureMappingFind": {"num": 1},
    "EmbeddingFeatureMappingImport": {"only_offset_flag": True, "num": 1},
    "Embedding": {"padding_idx": None, "max_norm": None, "norm_type": 2.0, "scale_grad_by_freq": False},
    "EmbeddingTableEvict": {"steps_to_live": 0},
    "ExtractImagePatches": {"padding": 'VALID'},
    "FFNExt": {"expertTokens": None, "bias1": None, "bias2": None, "scale": None, "offset": None, "deqScale1": None, "deqScale2": None, "antiquant_scale1": None, "antiquant_scale2": None, "antiquant_offset1": None, "antiquant_offset2": None, "activation": 'fastgelu', "inner_precise": 0},
    "FFT2": {"s": None, "dim": (-2, -1), "norm": None},
    "FFT": {"n": None, "dim": -1, "norm": None},
    "FFTOrtho": {"axes": None, "forward": True},
    "FFTWithSize": {"norm": 'backward', "onesided": True, "signal_sizes": ()},
    "FFTFreq": {"d": 1.0, "dtype": None},
    "FFTN": {"s": None, "dim": None, "norm": None},
    "FFTShift": {"dim": None},
    "FillScalar": {"dtype": None},
    "FillTensor": {"dtype": None},
    "FlashAttentionScoreGrad": {"pse_shift": None, "drop_mask": None, "padding_mask": None, "atten_mask": None, "softmax_max": None, "softmax_sum": None, "softmax_in": None, "attention_in": None, "prefix": None, "actual_seq_qlen": None, "actual_seq_kvlen": None, "keep_prob": 1.0, "scale_value": 1.0, "pre_tokens": 65536, "next_tokens": 65536, "inner_precise": 1, "input_layout": 'BSH', "sparse_mode": 0},
    "FlashAttentionScore": {"real_shift": None, "drop_mask": None, "padding_mask": None, "attn_mask": None, "prefix": None, "actual_seq_qlen": None, "actual_seq_kvlen": None, "keep_prob": 1.0, "scale_value": 1.0, "pre_tokens": 2147483647, "next_tokens": 2147483647, "inner_precise": 0, "input_layout": 'BSH', "sparse_mode": 0},
    "FlattenExt": {"start_dim": 0, "end_dim": -1},
    "Gather": {"batch_dims": 0},
    "GenerateEodMaskV2": {"start": 0, "steps": 1, "error_mode": 'cycle', "flip_mode": 'bitflip', "multiply_factor": 0.0, "bit_pos": 0, "flip_probability": 0.0},
    "GridSampler2DGrad": {"interpolation_mode": 'bilinear', "padding_mode": 'zeros', "align_corners": False},
    "GridSampler2D": {"interpolation_mode": 'bilinear', "padding_mode": 'zeros', "align_corners": False},
    "GridSampler3DGrad": {"interpolation_mode": 'bilinear', "padding_mode": 'zeros', "align_corners": False},
    "GridSampler3D": {"interpolation_mode": 'bilinear', "padding_mode": 'zeros', "align_corners": False},
    "GroupNormGrad": {"dx_is_require": True, "dgamma_is_require": True, "dbeta_is_require": True},
    "GroupNorm": {"weight": None, "bias": None, "eps": 1e-5},
    "HFFT2": {"s": None, "dim": (-2, -1), "norm": None},
    "HFFT": {"n": None, "dim": -1, "norm": None},
    "HFFTN": {"s": None, "dim": None, "norm": None},
    "HistcExt": {"bins": 100, "min": 0, "max": 0},
    "HShrinkGrad": {"lambd": 0.5},
    "HShrink": {"lambd": 0.5},
    "IDCT": {"type": 2, "n": None, "axis": -1, "norm": None},
    "IDCTN": {"type": 2, "s": None, "axes": None, "norm": None},
    "IFFT2": {"s": None, "dim": (-2, -1), "norm": None},
    "IFFT": {"n": None, "dim": -1, "norm": None},
    "IFFTN": {"s": None, "dim": None, "norm": None},
    "IFFTShift": {"dim": None},
    "IHFFT2": {"s": None, "dim": (-2, -1), "norm": None},
    "IHFFT": {"n": None, "dim": -1, "norm": None},
    "IHFFTN": {"s": None, "dim": None, "norm": None},
    "Im2ColExt": {"dilation": 1, "padding": 0, "stride": 1},
    "IncreFlashAttention": {"attn_mask": None, "actual_seq_lengths": None, "pse_shift": None, "dequant_scale1": None, "quant_scale1": None, "dequant_scale2": None, "quant_scale2": None, "quant_offset2": None, "antiquant_scale": None, "antiquant_offset": None, "block_table": None, "kv_padding_size": None, "num_heads": 1, "input_layout": 'BSH', "scale_value": 1.0, "num_key_value_heads": 0, "block_size": 0, "inner_precise": 1},
    "IndexAddExt": {"alpha": 1},
    "InplaceAddExt": {"alpha": 1},
    "InplaceAddmm": {"beta": 1, "alpha": 1},
    "InplaceAddsExt": {"alpha": 1},
    "InsertGemV2InBackward": {"start": 0, "steps": 1, "error_mode": 'cycle', "flip_mode": 'bitflip', "multiply_factor": 0.0, "bit_pos": 0, "flip_probability": 0.0},
    "IRFFT2": {"s": None, "dim": (-2, -1), "norm": None},
    "IRFFTDouble": {"dim": -1},
    "IRFFT": {"n": None, "dim": -1, "norm": None},
    "IRFFTN": {"s": None, "dim": None, "norm": None},
    "IsClose": {"rtol": 1e-05, "atol": 1e-08, "equal_nan": True},
    "L1LossBackwardExt": {"reduction": 'mean'},
    "L1LossExt": {"reduction": 'mean'},
    "LayerNormExt": {"weight": None, "bias": None, "eps": 1e-5},
    "LayerNormGradGrad": {"begin_norm_axis": 1, "begin_params_axis": 1},
    "LayerNormGrad": {"begin_norm_axis": 1, "begin_params_axis": 1},
    "LayerNormGradV3": {"begin_norm_axis": 1, "begin_params_axis": 1},
    "LayerNorm": {"begin_norm_axis": 1, "begin_params_axis": 1, "epsilon": 1e-7},
    "LayerNormV3": {"begin_norm_axis": 1, "begin_params_axis": 1, "epsilon": 1e-7},
    "LeakyReLUExt": {"negative_slope": 0.01},
    "LeakyReLUGradExt": {"negative_slope": 0.01, "is_result": False},
    "LinSpaceExt": {"dtype": None},
    "LogSoftmaxExt": {"dim": None, "dtype": None},
    "LogSoftmaxGrad": {"axis": -1},
    "LogSoftmax": {"axis": -1},
    "LogitGrad": {"eps": -1.0},
    "Logit": {"eps": -1.0},
    "LpNormV2": {"p": 2.0, "dim": None, "keepdim": False, "epsilon": 1e-12},
    "LstsqV2": {"driver": None},
    "MatMul": {"transpose_a": False, "transpose_b": False},
    "MaxPoolGradWithIndices": {"strides": None, "pads": 0, "dilation": (1, 1), "ceil_mode": False, "argmax_type": mstype.int64},
    "MaxPoolGradWithMask": {"strides": None, "pads": 0, "dilation": (1, 1), "ceil_mode": False, "argmax_type": mstype.int64},
    "MaxPoolWithIndices": {"strides": None, "pads": 0, "dilation": (1, 1), "ceil_mode": False, "argmax_type": mstype.int64},
    "MaxPoolWithMask": {"strides": None, "pads": 0, "dilation": (1, 1), "ceil_mode": False, "argmax_type": mstype.int64},
    "MaximumGradGrad": {"grad_x": True, "grad_y": True},
    "MaximumGrad": {"grad_x": True, "grad_y": True},
    "MeanExt": {"axis": None, "keep_dims": False, "dtype": None},
    "MedianDim": {"dim": -1, "keepdim": False},
    "MinimumGrad": {"grad_x": True, "grad_y": True},
    "MSELossExt": {"reduction": 'mean'},
    "MSELossGradExt": {"reduction": 'mean'},
    "NanToNum": {"nan": None, "posinf": None, "neginf": None},
    "NLLLossGrad": {"reduction": 'mean', "ignore_index": -100},
    "NLLLoss": {"reduction": 'mean', "ignore_index": -100},
    "Norm": {"p": 2.0, "dim": None, "keepdim": False, "dtype": None},
    "OneHotExt": {"axis": -1},
    "OneHot": {"axis": -1},
    "OnesLikeExt": {"dtype": None},
    "Ones": {"dtype": None},
    "PagedAttentionMask": {"antiquant_scale": None, "antiquant_offset": None, "alibi_mask": None, "kv_cache_quant_mode": 'DEFAULT'},
    "PagedAttention": {"antiquant_scale": None, "antiquant_offset": None, "attn_mask": None, "q_seq_lens": None, "kv_cache_quant_mode": 'DEFAULT'},
    "ProdExt": {"axis": None, "keep_dims": False, "dtype": None},
    "PromptKVCache": {"align_mode": 'LEFT'},
    "Qr": {"full_matrices": False},
    "RandExt": {"dtype": None},
    "RandLikeExt": {"dtype": None},
    "RandIntLike": {"dtype": None},
    "RandInt": {"dtype": None},
    "RandnLike": {"dtype": None},
    "Randn": {"dtype": None},
    "RandpermExt": {"dtype": mstype.int64},
    "RandpermV2": {"seed": 0, "offset": 0, "dtype": mstype.int64},
    "Range": {"maxlen": 1000000},
    "ReduceAll": {"axis": None, "keep_dims": False},
    "ReduceAny": {"axis": (), "keep_dims": False},
    "ReduceMax": {"axis": (), "keep_dims": False},
    "ReduceMean": {"axis": (), "keep_dims": False},
    "ReduceMin": {"axis": (), "keep_dims": False},
    "ReduceProd": {"axis": (), "keep_dims": False},
    "ReduceStd": {"axis": [], "unbiased": True, "keep_dims": False},
    "ReduceSum": {"axis": (), "keep_dims": False, "skip_mode": False},
    "RepeatInterleaveInt": {"dim": None, "output_size": None},
    "RepeatInterleaveTensor": {"dim": None, "output_size": None},
    "ResizeBicubicGrad": {"align_corners": False, "half_pixel_centers": False},
    "ResizeBicubic": {"align_corners": False, "half_pixel_centers": False},
    "ResizeBilinearGrad": {"align_corners": False, "half_pixel_centers": False},
    "ResizeBilinearV2": {"align_corners": False, "half_pixel_centers": False},
    "ResizeD": {"coordinate_transformation_mode": 'align_corners'},
    "ResizeLinear1DGrad": {"coordinate_transformation_mode": 'align_corners'},
    "ResizeLinear1D": {"coordinate_transformation_mode": 'align_corners'},
    "ResizeNearestNeighborGrad": {"align_corners": False, "half_pixel_centers": False},
    "ResizeNearestNeighbor": {"align_corners": False, "half_pixel_centers": False},
    "ResizeNearestNeighborV2Grad": {"align_corners": False, "half_pixel_centers": False},
    "ResizeNearestNeighborV2": {"align_corners": False, "half_pixel_centers": False},
    "RFFT2": {"s": None, "dim": (-2, -1), "norm": None},
    "RFFT": {"n": None, "dim": -1, "norm": None},
    "RFFTFreq": {"d": 1.0, "dtype": None},
    "RFFTN": {"s": None, "dim": None, "norm": None},
    "RmsNorm": {"epsilon": 1e-6},
    "Roll": {"axis": None},
    "RotaryPositionEmbeddingGrad": {"dx": None, "mode": 0},
    "RotaryPositionEmbedding": {"mode": 0},
    "Round": {"decimals": 0},
    "ScalarToTensor": {"dtype": None},
    "Scatter": {"reduce": 'none'},
    "ScatterValue": {"reduce": 'none'},
    "SearchSorted": {"sorter": None, "dtype": mstype.int64, "right": False},
    "SequenceConcat": {"axis": 0},
    "SilentCheckV2": {"c_min_steps": 7, "c_thresh_l1": 1000000.0, "c_coeff_l1": 100000.0, "c_thresh_l2": 10000.0, "c_coeff_l2": 5000.0, "npu_asd_detect": 1},
    "SoftmaxBackward": {"dim": -1},
    "Softmax": {"axis": -1},
    "SoftplusExt": {"beta": 1, "threshold": 20},
    "SoftplusGradExt": {"beta": 1, "threshold": 20},
    "SoftShrinkGrad": {"lambd": 0.5},
    "SoftShrink": {"lambd": 0.5},
    "SolveTriangular": {"trans": 0, "lower": False, "unit_diagonal": False},
    "SortExt": {"dim": -1, "descending": False, "stable": False},
    "Split": {"axis": 0, "output_num": 1},
    "SplitTensor": {"axis": 0},
    "SplitWithSize": {"axis": 0},
    "StackExt": {"dim": 0},
    "StridedSlice": {"begin_mask": 0, "end_mask": 0, "ellipsis_mask": 0, "new_axis_mask": 0, "shrink_axis_mask": 0},
    "SubExt": {"alpha": 1},
    "SumExt": {"dim": None, "keepdim": False, "dtype": None},
    "SwigluGrad": {"dim": -1},
    "Swiglu": {"dim": -1},
    "TensorScatterElements": {"axis": 0, "reduce": 'none'},
    "TopkExt": {"dim": -1, "largest": True, "sorted": True},
    "TopKRouter": {"drop_type": 0},
    "TraceV2Grad": {"offset": 0, "axis1": 1, "axis2": 0},
    "TraceV2": {"offset": 0, "axis1": 1, "axis2": 0, "dtype": None},
    "TrilExt": {"diagonal": 0},
    "Triu": {"diagonal": 0},
    "TupleToTensor": {"dtype": None},
    "Unique2": {"sorted": True, "return_inverse": False, "return_counts": False},
    "UnstackExt": {"axis": 0},
    "UpsampleBicubic2DGrad": {"output_size": None, "scales": None, "align_corners": False},
    "UpsampleBicubic2D": {"output_size": None, "scales": None, "align_corners": False},
    "UpsampleBilinear2DGrad": {"output_size": None, "scales": None, "align_corners": False},
    "UpsampleBilinear2D": {"output_size": None, "scales": None, "align_corners": False},
    "UpsampleLinear1DGrad": {"output_size": None, "scales": None, "align_corners": False},
    "UpsampleLinear1D": {"output_size": None, "scales": None, "align_corners": False},
    "UpsampleNearest1DGrad": {"output_size": None, "scales": None},
    "UpsampleNearest1D": {"output_size": None, "scales": None},
    "UpsampleNearest2DGrad": {"output_size": None, "scales": None},
    "UpsampleNearest2D": {"output_size": None, "scales": None},
    "UpsampleNearest3DGrad": {"output_size": None, "scales": None},
    "UpsampleNearest3D": {"output_size": None, "scales": None},
    "UpsampleTrilinear3DGrad": {"output_size": None, "scales": None, "align_corners": False},
    "UpsampleTrilinear3D": {"output_size": None, "scales": None, "align_corners": False},
    "ZerosLikeExt": {"dtype": None},
    "Zeros": {"dtype": None},
    "AddRmsNormQuantV2": {"epsilon": 1e-5},
    "DynamicQuantExt": {"smooth_scales": None},
    "FusedInferAttentionScore": {"pse_shift": None, "attn_mask": None, "actual_seq_lengths": None, "actual_seq_lengths_kv": None, "dequant_scale1": None, "quant_scale1": None, "dequant_scale2": None, "quant_scale2": None, "quant_offset2": None, "antiquant_scale": None, "antiquant_offset": None, "block_table": None, "query_padding_size": None, "kv_padding_size": None, "scale_value": 1.0, "pre_tokens": 2147483647, "next_tokens": 2147483647, "input_layout": 'BSH', "num_key_value_heads": 0, "sparse_mode": 0, "inner_precise": 1, "block_size": 0, "antiquant_mode": 0, "softmax_lse_flag": False},
    "GroupedMatmul": {"bias": None, "scale": None, "offset": None, "antiquant_scale": None, "antiquant_offset": None, "group_list": None, "split_item": 0, "group_type": -1},
    "KVCacheScatterUpdate": {"reduce": 'none'},
    "MoeFinalizeRouting": {"x2": None, "bias": None, "scales": None, "expanded_row_idx": None, "expanded_expert_idx": None},
    "QuantBatchMatmul": {"offset": None, "bias": None, "pertokenScaleOptional": None, "transpose_x1": False, "transpose_x2": False, "dtype": mstype.float16},
    "QuantV2": {"sqrt_mode": False, "rounding_mode": 'ROUND', "dst_type": mstype.int8},
    "WeightQuantBatchMatmul": {"antiquant_offset": None, "quant_scale": None, "quant_offset": None, "bias": None, "transpose_x": False, "transpose_weight": False, "antiquant_group_size": 0},
}

op_labels = {
    "AdamWeightDecay": {"side_effect_mem": True},
    "AdamW": {"side_effect_mem": True},
    "ApplyAdamW": {"side_effect_mem": True},
    "AssignAdd": {"side_effect_mem": True},
    "Assign": {"side_effect_mem": True},
    "CopyExt": {"side_effect_mem": True},
    "DecoderKVCache": {"side_effect_mem": True},
    "DropoutExt": {"side_effect_hidden": True},
    "DropoutGenMaskExt": {"side_effect_hidden": True},
    "Dropout": {"side_effect_hidden": True},
    "EmbeddingApplyAdaGrad": {"_process_node_engine_id": 'PS'},
    "EmbeddingApplyAdam": {"_process_node_engine_id": 'PS'},
    "EmbeddingApplyAdamW": {"_process_node_engine_id": 'PS'},
    "EmbeddingApplyFtrl": {"_process_node_engine_id": 'PS'},
    "EmbeddingApplyRmsprop": {"_process_node_engine_id": 'PS'},
    "EmbeddingApplySgd": {"_process_node_engine_id": 'PS'},
    "Embedding": {"side_effect_mem": True},
    "EmbeddingTableEvict": {"_process_node_engine_id": 'PS'},
    "Generator": {"side_effect_mem": True},
    "InplaceAddExt": {"side_effect_mem": True},
    "InplaceAddmm": {"side_effect_mem": True},
    "InplaceAddsExt": {"side_effect_mem": True},
    "Log": {"cust_aicpu": 'Log', "base": -1.0, "scale": 1.0, "shift": 0.0},
    "PromptKVCache": {"side_effect_mem": True},
    "ReshapeAndCache": {"side_effect_mem": True},
    "ResizeD": {"mode": 'linear'},
    "SilentCheckV2": {"side_effect_mem": True},
    "KVCacheScatterUpdate": {"side_effect_mem": True},
}
