通过资源标识key来获取对应的资源上下文对象。
ResourceContext *GetResourceContext(const ge::AscendString &key)
资源上下文对象。
基础定义如下,资源类算子可以基于此扩展。
struct ResourceContext {virtual ~ResourceContext() {}};
用于保存资源相关信息,如shape、datatype等。
若使用Create接口创建InferenceContext时未传入resource context管理器指针,则该接口返回空指针,因此使用其返回值之前需要判空。