FilesLast commitLast update
7 months ago
7 months ago
22 days ago
22 days ago
25 days ago
22 days ago
20 days ago
5 days ago
README

StatelessRandomNormalV3

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

  • Operator function: generates a random number tensor that follows the normal distribution based on the specified mean and standard deviation (stdev). It uses the counter-based Philox random number generation algorithm and supports mean and stdev in the form of a scalar or a tensor.

  • Computation formula:

    result=StatelessRandomNormalV2+Mul(std)+Add(mean)result = StatelessRandomNormalV2 + Mul(std) + Add(mean)

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
shape Input Shape of the output tensor. INT64, INT32 ND
key Input Key used by the counter-based random number generation algorithm. UINT64 ND
counter Input Initial counter value used by the counter-based random number generation algorithm. UINT64 ND
mean Input Mean of the normal distribution, which can be a scalar or a tensor with the same shape as the output. FLOAT ND
stdev Input Standard deviation of the normal distribution, which can be a scalar or a tensor with the same shape as the output. FLOAT ND
y Output Outputs random values that follow the normal distribution with the specified shape. FLOAT, BF16, FLOAT16 ND
dtype Attribute Optional attribute that specifies the data type of the output. INT -

Constraint Description

None

Invocation Description

Invocation Method Sample Code Description
aclnn invocation test_aclnn_normal_float_float Invokes the stateless_random_normal_v3 operator through the aclnnNormalFloatFloat API.
aclnn invocation test_aclnn_normal_float_tensor Invokes the stateless_random_normal_v3 operator through the aclnnNormalFloatTensor API.
aclnn invocation test_aclnn_normal_tensor_float Invokes the stateless_random_normal_v3 operator through the aclnnNormalTensorFloat API.
aclnn invocation test_aclnn_normal_tensor_tensor Invokes the stateless_random_normal_v3 operator through the aclnnNormalTensorTensor API.