Skip to content

Commit

Permalink
try to remove out
Browse files Browse the repository at this point in the history
  • Loading branch information
Difers committed Feb 7, 2024
1 parent 3fdce02 commit a58c1e6
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion paddle/fluid/pir/dialect/operator/ir/ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,6 @@
param: [x, ring_id, peer, use_calc_stream, num, id]
kernel:
func: partial_send
optional : out

- op: sparse_momentum
args: (Tensor param, Tensor grad, Tensor velocity, Tensor index, Tensor learning_rate, Tensor master_param,float mu, Scalar axis=0, bool use_nesterov=false,str regularization_method="", float regularization_coeff=0.0f, bool multi_precision=false, float rescale_grad=1.0f)
Expand Down
2 changes: 0 additions & 2 deletions paddle/phi/api/yaml/op_compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3642,8 +3642,6 @@
- op: partial_send
inputs :
x : X
outputs :
out : Out

- op: read_from_array
inputs:
Expand Down
5 changes: 1 addition & 4 deletions paddle/phi/infermeta/unary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2890,8 +2890,7 @@ void PartialSendInferMeta(const MetaTensor& x,
int peer,
bool use_calc_stream,
int num,
int id,
MetaTensor* out) {
int id) {
PADDLE_ENFORCE_GE(
peer,
0,
Expand All @@ -2912,8 +2911,6 @@ void PartialSendInferMeta(const MetaTensor& x,
true,
phi::errors::InvalidArgument(
"The id (%d) for partial_send op must >=0 and <num (%d)", id, num));
out->set_dtype(x.dtype());
out->set_dims(x.dims());
}

void PixelShuffleInferMeta(const MetaTensor& x,
Expand Down
3 changes: 1 addition & 2 deletions paddle/phi/infermeta/unary.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,7 @@ void PartialSendInferMeta(const MetaTensor& x,
int peer,
bool use_calc_stream,
int num,
int id,
MetaTensor* out);
int id);

void PixelShuffleInferMeta(const MetaTensor& x,
int upscale_factor,
Expand Down
2 changes: 0 additions & 2 deletions test/ir/pir/translator/test_partial_send_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ class TestPartialSendTranslator(test_op_translator.TestOpTranslator):
def append_op(self):
self.op_type = "partial_send"
x = paddle.ones(shape=(100, 2, 3), dtype='float32')
y = x
attrs = {'ring_id': 0, 'root_id': 0, 'use_calc_stream': False}
helper = LayerHelper(self.op_type)
helper.append_op(
type=self.op_type,
inputs={"X": x},
outputs={"Out": y},
attrs=attrs,
)

Expand Down

0 comments on commit a58c1e6

Please sign in to comment.