!33698 check Primtive null

Merge pull request !33698 from VectorSL/fix-sma-prim
This commit is contained in:
i-robot 2022-04-28 10:18:41 +00:00 committed by Gitee
commit 0288ad42b5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ void SparseMatrixAdd::Init(const std::vector<int64_t> &csr_a, const std::vector<
AbstractBasePtr SparseMatrixAddInfer(const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<AbstractBasePtr> &input_args) {
MS_EXCEPTION_IF_NULL(primitive);
const std::string op_name = primitive->name();
// Addition of two CSR tensors. C = Alpha * A + Beta * B.
// Eight input (CSR_A(three tensors), CSR_B(three tensors), Alpha, Beta)