[object Object]

[object Object][object Object]undefined
[object Object]

Description: Fills the [object Object] tensor with the number sampled from the discrete uniform distribution in the range of [object Object].

[object Object]

Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, [object Object] is called to perform computation.

  • [object Object]
  • [object Object]
[object Object]
  • Parameters:

    • [object Object] (aclTensor*, computation input | computation output): input and output tensor, aclTensor on the device. Empty tensors are not supported. are supported. The can be ND.
      • [object Object]Atlas training products[object Object]: The data type can be FLOAT16, FLOAT32, DOUBLE, INT32, INT64, INT16, INT8, UINT8, BOOL, COMPLEX64, or COMPLEX128.
      • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]: The data type can be BFLOAT16, FLOAT16, FLOAT32, DOUBLE, INT32, INT64, INT16, INT8, UINT8, BOOL, COMPLEX64, or COMPLEX128.
    • [object Object] (int64_t, computation input): INT64 type on the host, left boundary of the discrete uniform distribution. The value must be within the value range of the [object Object] data type, and must be less than that of [object Object]. The data type can be INT64.
    • [object Object] (int64_t, computation input): INT64 type on the host, right boundary of the discrete uniform distribution. The value must be within the value range of the [object Object] data type. The data type can be INT64.
    • [object Object] (int64_t, computation input): INT64 type on the host, seed of the random number generator, which affects the generated random number sequence. The data type can be INT64.
    • [object Object] (int64_t, computation input): INT64 type on the host, offset of the random number generator, which affects the position of the generated random number sequence. After the offset is set, the generated random number sequence starts from the specified position. The data type can be INT64.
    • [object Object] (uint64_t*, output): size of the workspace to be allocated on the device.
    • [object Object] (aclOpExecutor**, output): operator executor, containing the operator computation process.
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
[object Object]
  • Parameters:

    • [object Object] (void *, input): address of the workspace to be allocated on the device.
    • [object Object] (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by the first-phase API [object Object].
    • [object Object] (aclOpExecutor *, input): operator executor, covering the operator computation process.
    • [object Object] (aclrtStream, input): stream for executing the task.
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic computing:
    • [object Object] defaults to deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]