Skip to content

Commit

Permalink
【Hackathon 6th Fundable Projects 3 No.276】prune_gate_by_capacity (#64700
Browse files Browse the repository at this point in the history
)

* Fix

* Fix

* ci

* Fix
  • Loading branch information
co63oc authored Jun 5, 2024
1 parent 71a4e59 commit ee91116
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 168 deletions.
30 changes: 0 additions & 30 deletions paddle/fluid/operators/ops_signature/prune_gate_by_capacity_sig.cc

This file was deleted.

128 changes: 0 additions & 128 deletions paddle/fluid/operators/prune_gate_by_capacity_op.cc

This file was deleted.

9 changes: 0 additions & 9 deletions paddle/phi/ops/yaml/inconsistent/static_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -591,15 +591,6 @@
interfaces : paddle::dialect::InferSymbolicShapeInterface
traits : pir::SideEffectTrait

- op : prune_gate_by_capacity
args : (Tensor gate_idx, Tensor expert_count, int64_t n_expert, int64_t n_worker)
output : Tensor(new_gate_idx)
infer_meta :
func : PruneGateByCapacityInferMeta
kernel :
func : prune_gate_by_capacity
data_type : gate_idx

- op : pull_box_sparse
args : (Tensor w, Tensor[] ids, bool is_sparse = false, bool is_distributed = false, int size = 1)
output : Tensor[](out){ids.size()}
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/ops/yaml/op_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4224,7 +4224,7 @@
inputs:
{gate_idx: GateIdx, expert_count: ExpertCount}
outputs:
new_gate_idx: NewGateIdx
out_gate_idx: NewGateIdx

- op: pyramid_hash
backward: pyramid_hash_grad
Expand Down
9 changes: 9 additions & 0 deletions paddle/phi/ops/yaml/ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3289,6 +3289,15 @@
backward : prod_grad
interfaces : paddle::dialect::InferSymbolicShapeInterface

- op : prune_gate_by_capacity
args : (Tensor gate_idx, Tensor expert_count, int64_t n_expert=0, int64_t n_worker=0)
output : Tensor(out_gate_idx)
infer_meta :
func : PruneGateByCapacityInferMeta
kernel :
func : prune_gate_by_capacity
data_type : gate_idx

- op : psroi_pool
args : (Tensor x, Tensor boxes, Tensor boxes_num, int pooled_height=1, int pooled_width=1, int output_channels=1, float spatial_scale=1.0)
output : Tensor
Expand Down

0 comments on commit ee91116

Please sign in to comment.