GeSession Constructor and Destructor

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference products

Atlas training products

Header File/Library File

  • Header file: #include <ge/ge_api_v2.h>
  • Library file: libge_runner_v2.so

Function Usage

Constructs and destructs an object of class GeSession.

Prototype

1
2
explicit GeSession(const std::map<AscendString, AscendString> &options)
~GeSession()

Parameters

Parameter

Input/Output

Description

options

Input

A key-value mapping table, for the GeSession configuration. key indicates the parameter type, and value indicates the parameter value, both of type string.

Generally, this parameter can be left blank, indicating using the same options configuration passed to GEInitializeV2.

This parameter is available for configuring the current GeSession separately. For details about the supported configuration items, see the parameters of the session level in Command-Line Options.

Returns

None

Constraints

GeSessions cannot be executed concurrently. In addition, a GeSession exclusively occupies resources. As such, the concurrent creation of multiple GeSessions may fail due to resource constraints.