Function mindspore::api::IsPrimitiveCNode

Function Documentation

bool mindspore::api::IsPrimitiveCNode(const AnfNodePtr &node, const PrimitivePtr &prim = nullptr)

Check whether the given node is a cnode with the given Primitive as the first input.

参数
  • node[in] The given node to be checked.

  • prim[in] The Primitive value, nullptr means match any Primitive.

返回

True if the node is cnode and the first input is the given Primitive, false otherwise.