Skip to content

Commit

Permalink
[NPU] minor changes for version control to support version without su…
Browse files Browse the repository at this point in the history
…ffix (#42856)
  • Loading branch information
Aganlengzi authored May 19, 2022
1 parent 148582f commit 892f685
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion paddle/fluid/operators/fill_constant_op_npu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class FillConstantNPUKernel : public framework::OpKernel<T> {
tensor_value.mutable_data<T>({1}, ctx.GetPlace());
FillNpuTensorWithConstant<T>(&tensor_value, value);
NpuOpRunner runner;
#if (CANN_VERSION_CODE >= 503003 && CANN_VERSION_CODE < 504001)
#if (CANN_VERSION_CODE >= 503003 && CANN_VERSION_CODE < 504000)
runner.SetType("FillD")
.AddInput(tensor_value)
.AddOutput(*out_var)
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/set_value_op_npu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class SetValueNPUKernel : public framework::OpKernel<T> {
.AddInput(std::move(index_indices))
.AddInput(val_temp)
.AddOutput(out_temp)
#if (CANN_VERSION_CODE >= 504001)
#if (CANN_VERSION_CODE >= 504000)
.AddAttrs({{"use_locking", false}})
#endif
.Run(stream);
Expand Down

0 comments on commit 892f685

Please sign in to comment.