Skip to content

Commit 0ffabff

Browse files
authored
test=document_fix (#73561)
1 parent d25d7b7 commit 0ffabff

File tree

11 files changed

+0
-474
lines changed

11 files changed

+0
-474
lines changed

paddle/phi/infermeta/ternary.cc

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,43 +1630,6 @@ void MoeCombineInferMeta(const MetaTensor& x,
16301630
y->set_dtype(x.dtype());
16311631
}
16321632

1633-
void MoeCombineNoWeightInferMeta(const MetaTensor& x,
1634-
const MetaTensor& scatter_index,
1635-
MetaTensor* y) {
1636-
auto x_dim = x.dims();
1637-
auto scatter_index_dim = scatter_index.dims();
1638-
PADDLE_ENFORCE_EQ(x_dim.size(),
1639-
2,
1640-
common::errors::InvalidArgument(
1641-
"The dimensions of Input(x) must be 2, but "
1642-
"received dimensions of Input(x) is [%d]",
1643-
x_dim.size()));
1644-
PADDLE_ENFORCE_EQ(scatter_index_dim.size(),
1645-
2,
1646-
common::errors::InvalidArgument(
1647-
"The dimensions of Input(scatter_index) must be 2, but "
1648-
"received dimensions of Input(scatter_index) is [%d]",
1649-
scatter_index_dim.size()));
1650-
PADDLE_ENFORCE_EQ(scatter_index.dtype(),
1651-
phi::DataType::INT32,
1652-
common::errors::InvalidArgument(
1653-
"The input scatter_index type should be int32"
1654-
"But received scatter_index type = %s",
1655-
scatter_index.dtype()));
1656-
int64_t seqlen = scatter_index_dim[0];
1657-
int64_t k = scatter_index_dim[1];
1658-
int64_t hidden_size = x_dim[1];
1659-
PADDLE_ENFORCE_EQ(x_dim[0],
1660-
seqlen * k,
1661-
common::errors::InvalidArgument(
1662-
"The upper dim of Input(x) [%d] must equal to "
1663-
"the total size of Input(scatter_index) [%d].",
1664-
x_dim[0],
1665-
seqlen * k));
1666-
y->set_dims(phi::make_ddim({seqlen, hidden_size}));
1667-
y->set_dtype(x.dtype());
1668-
}
1669-
16701633
void MoeGateDispatchPartialNoSoftmaxTopKInferMeta(
16711634
const MetaTensor& x,
16721635
const MetaTensor& combine_weights,

paddle/phi/infermeta/ternary.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,6 @@ void MoeCombineInferMeta(const MetaTensor& x,
274274
const MetaTensor& scatter_index,
275275
MetaTensor* y);
276276

277-
void MoeCombineNoWeightInferMeta(const MetaTensor& x,
278-
const MetaTensor& scatter_index,
279-
MetaTensor* y);
280-
281277
void MoeGateDispatchPartialNoSoftmaxTopKInferMeta(
282278
const MetaTensor& x,
283279
const MetaTensor& combine_weights,

paddle/phi/kernels/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ if(((WITH_GPU) AND (CUDA_VERSION VERSION_LESS 12.0))
6464
"legacy/gpu/expand_modality_expert_id_kernel.cu"
6565
"legacy/gpu/moe_combine_kernel.cu"
6666
"legacy/gpu/moe_combine_grad_kernel.cu"
67-
"legacy/gpu/moe_combine_no_weight_kernel.cu"
68-
"legacy/gpu/moe_combine_no_weight_grad_kernel.cu"
6967
"legacy/gpu/cal_aux_loss_kernel.cu"
7068
"legacy/gpu/cal_aux_loss_grad_kernel.cu"
7169
"legacy/gpu/ext_build_src_rank_and_local_expert_id_kernel.cu"

paddle/phi/kernels/legacy/gpu/moe_combine_no_weight_grad_kernel.cu

Lines changed: 0 additions & 107 deletions
This file was deleted.

paddle/phi/kernels/legacy/gpu/moe_combine_no_weight_kernel.cu

Lines changed: 0 additions & 123 deletions
This file was deleted.

paddle/phi/ops/yaml/backward.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,17 +2320,6 @@
23202320
kernel :
23212321
func : moe_combine_grad
23222322

2323-
- backward_op : moe_combine_no_weight_grad
2324-
forward : moe_combine_no_weight (Tensor x, Tensor scatter_index) -> Tensor(y)
2325-
args : (Tensor x, Tensor scatter_index, Tensor y_grad)
2326-
output : Tensor(x_grad)
2327-
infer_meta :
2328-
func : UnchangedInferMeta
2329-
param : [x]
2330-
kernel :
2331-
func : moe_combine_no_weight_grad
2332-
no_need_buffer : x
2333-
23342323
- backward_op : moe_gate_dispatch_grad
23352324
forward : moe_gate_dispatch (Tensor x, Tensor gate_logits, Tensor corr_bias, int64_t k, int64_t capacity, bool use_pad) -> Tensor(y), Tensor(combine_weights), Tensor(scatter_index), Tensor(expert_offset), Tensor(expert_id)
23362325
args : (Tensor combine_weights, Tensor scatter_index, Tensor expert_id, Tensor y_grad, Tensor combine_weights_grad, int64_t k, int64_t capacity, bool use_pad)

paddle/phi/ops/yaml/ops.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3678,16 +3678,6 @@
36783678
data_type : x
36793679
backward : moe_combine_grad
36803680

3681-
- op : moe_combine_no_weight
3682-
args : (Tensor x, Tensor scatter_index)
3683-
output : Tensor(y)
3684-
infer_meta :
3685-
func : MoeCombineNoWeightInferMeta
3686-
kernel :
3687-
func : moe_combine_no_weight
3688-
data_type : x
3689-
backward : moe_combine_no_weight_grad
3690-
36913681
- op : moe_gate_dispatch
36923682
args : (Tensor x, Tensor gate_logits, Tensor corr_bias, int64_t k, int64_t capacity, bool use_pad)
36933683
output : Tensor(y), Tensor(combine_weights), Tensor(scatter_index), Tensor(expert_offset), Tensor(expert_id)

python/paddle/incubate/nn/functional/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
from .int_bincount import int_bincount
6161
from .masked_multihead_attention import masked_multihead_attention
6262
from .moe_combine import moe_combine
63-
from .moe_combine_no_weight import moe_combine_no_weight
6463
from .moe_gate_dispatch import moe_gate_dispatch
6564
from .moe_gate_dispatch_partial_nosoftmaxtopk import (
6665
moe_gate_dispatch_partial_nosoftmaxtopk,

python/paddle/incubate/nn/functional/moe_combine_no_weight.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

test/legacy_test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ if(NOT WITH_GPU
513513
test_incubate_fused_rmsnorm_ext
514514
test_incubate_int_bincount
515515
test_incubate_moe_combine
516-
test_incubate_moe_combine_no_weight
517516
test_incubate_moe_gate_dispatch_partial_nosoftmaxtopk
518517
test_incubate_moe_gate_dispatch_w_permute_bwd
519518
test_incubate_moe_gate_dispatch_w_permute

0 commit comments

Comments
 (0)