1 //===- mlir_test_cblas_interface.h - Simple Blas subset interface ---------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 #ifndef MLIR_CPU_RUNNER_MLIR_TEST_CBLAS_INTERFACE_H_ 9 #define MLIR_CPU_RUNNER_MLIR_TEST_CBLAS_INTERFACE_H_ 10 11 #include "mlir/ExecutionEngine/RunnerUtils.h" 12 13 #ifdef _WIN32 14 #ifndef MLIR_TEST_CBLAS_INTERFACE_EXPORT 15 #ifdef mlir_test_cblas_interface_EXPORTS 16 // We are building this library 17 #define MLIR_TEST_CBLAS_INTERFACE_EXPORT __declspec(dllexport) 18 #else 19 // We are using this library 20 #define MLIR_TEST_CBLAS_INTERFACE_EXPORT __declspec(dllimport) 21 #endif // mlir_test_cblas_interface_EXPORTS 22 #endif // MLIR_TEST_CBLAS_INTERFACE_EXPORT 23 #else 24 #define MLIR_TEST_CBLAS_INTERFACE_EXPORT 25 #endif // _WIN32 26 27 extern "C" MLIR_TEST_CBLAS_INTERFACE_EXPORT void 28 _mlir_ciface_linalg_fill_viewf32_f32(StridedMemRefType<float, 0> *X, float f); 29 30 extern "C" MLIR_TEST_CBLAS_INTERFACE_EXPORT void 31 _mlir_ciface_linalg_fill_viewsxf32_f32(StridedMemRefType<float, 1> *X, float f); 32 33 extern "C" MLIR_TEST_CBLAS_INTERFACE_EXPORT void 34 _mlir_ciface_linalg_fill_viewsxsxf32_f32(StridedMemRefType<float, 2> *X, 35 float f); 36 37 extern "C" MLIR_TEST_CBLAS_INTERFACE_EXPORT void 38 _mlir_ciface_linalg_copy_viewf32_viewf32(StridedMemRefType<float, 0> *I, 39 StridedMemRefType<float, 0> *O); 40 41 extern "C" MLIR_TEST_CBLAS_INTERFACE_EXPORT void 42 _mlir_ciface_linalg_copy_viewsxf32_viewsxf32(StridedMemRefType<float, 1> *I, 43 StridedMemRefType<float, 1> *O); 44 45 extern "C" MLIR_TEST_CBLAS_INTERFACE_EXPORT void 46 _mlir_ciface_linalg_copy_viewsxsxf32_viewsxsxf32( 47 StridedMemRefType<float, 2> *I, StridedMemRefType<float, 2> *O); 48 49 extern "C" MLIR_TEST_CBLAS_INTERFACE_EXPORT void 50 _mlir_ciface_linalg_dot_viewsxf32_viewsxf32_viewf32( 51 StridedMemRefType<float, 1> *X, StridedMemRefType<float, 1> *Y, 52 StridedMemRefType<float, 0> *Z); 53 54 extern "C" MLIR_TEST_CBLAS_INTERFACE_EXPORT void 55 _mlir_ciface_linalg_matmul_viewsxsxf32_viewsxsxf32_viewsxsxf32( 56 StridedMemRefType<float, 2> *A, StridedMemRefType<float, 2> *B, 57 StridedMemRefType<float, 2> *C); 58 59 #endif // MLIR_CPU_RUNNER_MLIR_TEST_CBLAS_INTERFACE_H_ 60