Stencil Code Accelerator Interface

Coding Guide

The Stencil Code Accelerator (SCA) interface accelerates stencil computations, a processing pattern frequently used in image processing, scientific or engineering simulations, deep learning, and so on. The SCA interface enables Python scripts to call functions provided by SCA of NEC Numeric Library Collection, which is highly optimized for Vector Engine of SX-Aurora TSUBASA.

Functions

Creation of Stencil Descriptor

nlcpy.sca.create_descriptor

Returns one or more stencil descriptors.

nlcpy.sca.empty_description

Returns an empty stencil description.

Creation of Kernel

nlcpy.sca.create_kernel

Creates a SCA kernel.

Execution of Kernel

nlcpy.sca.kernel.kernel.execute

Executes the created SCA kernel and returns the result of stencil computations.

Destruction of Kernel

nlcpy.sca.destroy_kernel

Destroy a SCA kernel.

Stride Adjustment

nlcpy.sca.convert_optimized_array

Converts existing ndarrays into optimized ndarrays, whose strides are adjusted to improve perfomance, filled with zeros.

nlcpy.sca.create_optimized_array

Creates an optimized ndarray, whose strides are adjusted to improve perfomance, filled with zeros.