FilesLast commitLast update
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
22 days ago
9 days ago
README

FileConstant

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products √
Atlas inference products √
Atlas training products √

Function Description

Creates a file constant tensor for processing extremely large weight data stored in files. The shape and data type of the output tensor y are inferred based on the shape and dtype attributes. The output shape is consistent with the shape attribute, and the output data type is consistent with the dtype attribute.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
file_path Attribute String that records the file path. String, with the default value "" -
file_id Attribute String that records the file ID. String, with the default value "" -
shape Attribute Required. Shape of the data. ListInt -
dtype Attribute Required. Data type. Type -
y Output File constant tensor, whose shape is consistent with the shape attribute and whose data type is consistent with the dtype attribute. TensorType::ALL() ND

Constraint Description

None

Invocation Description

The FileConstant operator is a basic operator of the graph engine. It is usually used as a file constant node in a graph and is not invoked separately.

Invocation Method Invocation Sample Description
Graph-mode invocation test_geir_file_constant Invokes the FileConstant operator by building a graph through the operator IR