Intel® oneAPI Math Kernel Library Developer Reference - C

mkl_graph_optimize_mxm

Computes internal optimized data for graph matrices to be used in a matrix-matrix product.

Syntax

mkl_graph_status_t mkl_graph_optimize_mxm(mkl_graph_matrix_t Mask, mkl_graph_semiring_t semiring, mkl_graph_matrix_t A, mkl_graph_matrix_t B, mkl_graph_descriptor_t desc, int64_t ncalls);

Include Files

Description

The mkl_graph_optimize_mxm routine computes internal optimized data for graph matrices to be used in mkl_graph_mxm. Input arguments match the definitions of the arguments for mkl_graph_mxm. You can provide as much information about future calls to mkl_graph_mxm as is known. If mask or the descriptor is not known, NULL can be passed for the corresponding argument.

The last argument, ncalls, estimates the number of calls to mkl_graph_mxm with the current configuration of input parameters. More aggressive optimizations may be performed for large values of ncalls. If such an estimate is not known, a negative value can be passed to use the default behavior.

The optimizations target the matrices A and B, and both may be optimized if they are not NULL. If only one matrix should be optimized, the other can be passed as NULL. At least one of A and B must be non-NULL. Optimized data are stored inside the provided graph matrices A and B and will be deallocated once non-compatible matrix changes are made or when the matrix is destroyed via mkl_graph_matrix_destroy.

Input Parameters

Mask

A graph matrix which will be used as a mask in mkl_graph_mxm. If it is not known or will not be present in the operation, NULL can be passed.

semiring

A semiring which will be used in mkl_graph_mxm. Refer to Graph API Glossary for more details. If it is not known, any value from mkl_graph_semiring_t can be used.

A

A graph matrix which will be used as the first input matrix in mkl_graph_mxm. If only the second input to mkl_graph_mxm should be optimized, NULL can be passed.

B

A graph matrix which will be used as the second input matrix in mkl_graph_mxm. If only the first input to mkl_graph_mxm should be optimized, NULL can be passed.

desc

A graph descriptor which defines additional modifiers for mkl_graph_mxm. If it is not known, will not be used, or will change between multiple calls to mkl_graph_mxm, NULL can be passed.

ncalls

An estimate on the number of calls to the matrix-matrix product which will follow the call to mkl_graph_optimize_mxm . If negative, the routine uses the default strategy.

Output Parameters

A

If not NULL on input, a graph matrix with the optimized data for a matrix-matrix product.

B

If not NULL on input, a graph matrix with optimized data for a matrix-matrix product.

Return Values

The function returns a value indicating whether the operation was successful or not and why. Refer to Graph API Glossary for a list of possible options.

Optimization Notice

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804

This notice covers the following instruction sets: SSE2, SSE4.2, AVX2, AVX-512.