Skip to content

Commit

Permalink
remove use_calc_stream param [fluid_ops] c_split (#68969)
Browse files Browse the repository at this point in the history
* Fix

* Fix

* test position
  • Loading branch information
co63oc authored Oct 31, 2024
1 parent a36943a commit 490557c
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 17 deletions.
4 changes: 0 additions & 4 deletions paddle/fluid/operators/collective/c_split_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ class CSplitOpMaker : public framework::OpProtoAndCheckerMaker {
AddAttr<int>("rank", "(int default 0) rank id.").SetDefault(0);
AddAttr<int>("nranks", "(int default 1) number of ranks.").SetDefault(1);
AddAttr<int>("ring_id", "(int default 0) ring id.").SetDefault(0);
AddAttr<bool>(
"use_calc_stream",
"(bool default false) eject CUDA operations to calculation stream.")
.SetDefault(false);
AddAttr<bool>("use_model_parallel",
"(bool default false) use this op with model parallel.")
.SetDefault(true);
Expand Down
5 changes: 1 addition & 4 deletions paddle/fluid/operators/ops_signature/c_split_sig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ namespace phi {
KernelSignature CSplitOpArgumentMapping(
const ArgumentMappingContext& ctx UNUSED) {
return KernelSignature(
"c_split",
{"X"},
{"rank", "nranks", "ring_id", "use_calc_stream", "use_model_parallel"},
{"Out"});
"c_split", {"X"}, {"rank", "nranks", "use_model_parallel"}, {"Out"});
}

} // namespace phi
Expand Down
2 changes: 0 additions & 2 deletions paddle/phi/kernels/c_split_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ void CSplitKernel(const Context& ctx,
const DenseTensor& x,
int rank,
int nranks,
int ring_id,
bool use_calc_stream,
bool use_model_parallel,
DenseTensor* out);

Expand Down
2 changes: 0 additions & 2 deletions paddle/phi/kernels/cpu/c_split_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ void CSplitKernel(const Context& ctx,
const DenseTensor& x,
int rank,
int nranks,
int ring_id,
bool use_calc_stream,
bool use_model_parallel,
DenseTensor* out) {
PADDLE_THROW(common::errors::Unavailable(
Expand Down
2 changes: 0 additions & 2 deletions paddle/phi/kernels/gpu/c_split_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ void CSplitKernel(const Context& ctx,
const DenseTensor& x,
int rank,
int nranks,
int ring_id,
bool use_calc_stream,
bool use_model_parallel,
DenseTensor* out) {
auto place = ctx.GetPlace();
Expand Down
2 changes: 0 additions & 2 deletions paddle/phi/kernels/xpu/c_split_kernel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ void CSplitKernel(const Context& dev_ctx,
const DenseTensor& x,
int rank,
int nranks,
int ring_id,
bool use_calc_stream,
bool use_model_parallel,
DenseTensor* out) {
using XPUType = typename XPUTypeTrait<T>::Type;
Expand Down
3 changes: 2 additions & 1 deletion paddle/phi/ops/yaml/inconsistent/static_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,14 @@
inplace : (x -> out)

- op : c_split
args : (Tensor x, int rank = 0, int nranks = 1, int ring_id = 0, bool use_calc_stream = false, bool use_model_parallel = true)
args : (Tensor x, int rank = 0, int nranks = 1, int ring_id = 0, bool use_model_parallel = true)
output : Tensor(out)
infer_meta :
func : CSplitInferMeta
param : [x, nranks]
kernel :
func : c_split
param: [x, rank, nranks, use_model_parallel]

- op : coalesce_tensor_
args : (Tensor[] input, DataType dtype, bool copy_data = false, bool set_constant = false, bool persist_output = false, float constant = 0.0, bool use_align = true, int align_size = -1, int size_of_dtype = -1, int64_t[] concated_shapes = {}, int64_t[] concated_ranks = {})
Expand Down
8 changes: 8 additions & 0 deletions paddle/phi/ops/yaml/op_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@
- add_input : ValueTensor
comment : In order to support multi-tag task.

- op : c_split
version :
- checkpoint : Upgrade c_split delete 1 attribute[use_calc_stream].
action :
- delete_attr : use_calc_stream
comment : eject CUDA operations to calculation stream.
default : false

- op : clip
version :
- checkpoint : Upgrade clip add a new input [Min]
Expand Down

0 comments on commit 490557c

Please sign in to comment.