未验证 提交 892f6850 编写于 作者: A Aganlengzi 提交者: GitHub

[NPU] minor changes for version control to support version without suffix (#42856)

上级 148582fe
......@@ -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)
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册