Function mindspore::api::IsPrimitive

Function Documentation

bool mindspore::api::IsPrimitive(const AnfNodePtr &node, const PrimitivePtr &prim)

Check whether the given node is a ValueNode with the given Primitive.

Parameters
  • node[in] The given node to be checked.

  • prim[in] The Primitive value.

Returns

True if the given node is a ValueNode with the given Primitive, false otherwise.