CreateScalar
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <ge/es_graph_builder.h>
- Library files: libeager_style_graph_builder_base.so and libeager_style_graph_builder_base_static.a
Function Usage
Creates a scalar constant.
Prototype
- Create a scalar constant of the int64 type.
1EsTensorHolder CreateScalar(int64_t value)
- Create a scalar constant of the int32 type.
1EsTensorHolder CreateScalar(int32_t value)
- Create a scalar constant of the uint64 type.
1EsTensorHolder CreateScalar(uint64_t value)
- Create a scalar constant of the uint32 type.
1EsTensorHolder CreateScalar(uint32_t value)
- Create a scalar constant of the float type.
1EsTensorHolder CreateScalar(float value)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
value |
Input |
Scalar value. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
EsTensorHolder |
Created scalar tensor holder. If the creation fails, an invalid EsTensorHolder is returned. |
Restrictions
None
Example
1 2 | EsGraphBuilder builder("test_graph"); auto s1 = builder.CreateScalar(int64_t(42)); |
Parent topic: EsGraphBuilder