asdConvolve

Applicable Products

Hardware Model

Supported or Not

Atlas 200I/500 A2 inference products

Not supported

Atlas inference products

Not supported

Atlas training products

Not supported

Atlas A2 training products / Atlas A2 inference products

Supported

Atlas A3 training products / Atlas A3 inference products

Not supported

Function Description

API function

asdConvolve: performs one-dimensional filtering on a given signal.

Formula:

  • asdConvolve formula: ,

    where w(k) is the element at the kth position of the output, u(j) is the one-dimensional signal at the jth position of the input, and v(k-j+1) is the filter convolution kernel at the (k-j+1)th position. The one-dimensional signal is a complex vector, and the filter convolution kernel is a real vector.

  • Example:

    Input u:

    [[1.+1.j 2.+2.j]
     [1.+1.j 2.+2.j]]

    Input v:

     [1. 2. 3. 4.]

    After the asdConvolve operator is called, the output result is as follows:

    [[4.+4.j, 7.+7.j],
    [4.+4.j, 7.+7.j]]

Function Prototype

AspbStatus asdConvolve(const aclTensor *signal, const aclTensor *kernel, aclTensor *output, asdConvolveMode_t mode, void *stream, void *workspace)

Parameter Description

asdConvolve

Parameter

Input/Output

Type

Description

signal

Input

aclTensor *

Input 1D signal.

kernel

Input

aclTensor *

Input convolutional filter.

output

Input/Output

aclTensor *

Output signal

mode

Input

asdConvolveMode_t

Filter convolution mode. Currently, only ASD_CONVOLVE_SAME is supported. That is, the dimensions of the input and output vectors are the same.

stream

Input

void*

Stream during operator execution.

workspace

Input

void *

Workspace pointer required by the operator.

Return Value Description

For details about the return values, see Return Value.

Constraints

asdMul

  • The supported CANN version is CANN 8.0 or later.
  • The supported data types of the input signal are COMPLEX32 and COMPLEX64. The supported data types of the input filtering convolution kernel are FLOAT16 and FLOAT32.
  • The supported output data types are COMPLEX32 and COMPLEX64.
  • The shape of the operator input signal is [BatchCount, n]. The output shape is the same as the input shape. The shape of the input filtering convolution kernel is [k].

Calling Example

For details about the operator calling example, see asdConvolve_complex32 or asdConvolve_complex64.