MLIR
20.0.0git
|
#include <assert.h>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include "mlir/ExecutionEngine/CRunnerUtils.h"
#include "mlir/ExecutionEngine/Float16bits.h"
Go to the source code of this file.
Classes | |
struct | impl::StaticSizeMult< Dims > |
struct | impl::StaticSizeMult< N, Dims... > |
struct | impl::VectorDataPrinter< T, M, Dims > |
struct | impl::MemRefDataPrinter< T > |
struct | impl::MemRefDataVerifier< T > |
Verify the result of two computations are equivalent up to a small numerical error and return the number of errors. More... | |
Namespaces | |
impl | |
Macros | |
#define | MLIR_RUNNERUTILS_EXPORT __attribute__((visibility("default"))) |
Typedefs | |
using | impl::index_type = uint64_t |
using | impl::complex64 = std::complex< double > |
using | impl::complex32 = std::complex< float > |
#define MLIR_RUNNERUTILS_EXPORT __attribute__((visibility("default"))) |
Definition at line 31 of file RunnerUtils.h.
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_nanoTime | ( | ) |
Definition at line 127 of file RunnerUtils.cpp.
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref0dF32 | ( | StridedMemRefType< float, 0 > * | m | ) |
Definition at line 173 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref1dC32 | ( | StridedMemRefType< impl::complex32, 1 > * | m | ) |
Definition at line 213 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref1dC64 | ( | StridedMemRefType< impl::complex64, 1 > * | m | ) |
Definition at line 218 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref1dF32 | ( | StridedMemRefType< float, 1 > * | m | ) |
Definition at line 176 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref1dF64 | ( | StridedMemRefType< double, 1 > * | m | ) |
Definition at line 203 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref1dI32 | ( | StridedMemRefType< int32_t, 1 > * | m | ) |
Definition at line 194 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref1dI64 | ( | StridedMemRefType< int64_t, 1 > * | m | ) |
Definition at line 199 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref1dI8 | ( | StridedMemRefType< int8_t, 1 > * | m | ) |
Definition at line 189 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref1dInd | ( | StridedMemRefType< impl::index_type, 1 > * | m | ) |
Definition at line 208 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref2dF32 | ( | StridedMemRefType< float, 2 > * | m | ) |
Definition at line 179 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref3dF32 | ( | StridedMemRefType< float, 3 > * | m | ) |
Definition at line 182 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemref4dF32 | ( | StridedMemRefType< float, 4 > * | m | ) |
Definition at line 185 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefBF16 | ( | UnrankedMemRefType< bf16 > * | m | ) |
Definition at line 100 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefC32 | ( | UnrankedMemRefType< impl::complex32 > * | m | ) |
Definition at line 118 of file RunnerUtils.cpp.
References impl::printMemRef().
Referenced by printMemrefC32().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefC64 | ( | UnrankedMemRefType< impl::complex64 > * | m | ) |
Definition at line 123 of file RunnerUtils.cpp.
References impl::printMemRef().
Referenced by printMemrefC64().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefF16 | ( | UnrankedMemRefType< f16 > * | m | ) |
Definition at line 96 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefF32 | ( | UnrankedMemRefType< float > * | m | ) |
Definition at line 104 of file RunnerUtils.cpp.
References impl::printMemRef().
Referenced by printMemrefF32().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefF64 | ( | UnrankedMemRefType< double > * | m | ) |
Definition at line 108 of file RunnerUtils.cpp.
References impl::printMemRef().
Referenced by printMemrefF64().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefI16 | ( | UnrankedMemRefType< int16_t > * | m | ) |
Definition at line 84 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefI32 | ( | UnrankedMemRefType< int32_t > * | m | ) |
Definition at line 88 of file RunnerUtils.cpp.
References impl::printMemRef().
Referenced by printMemrefI32().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefI64 | ( | UnrankedMemRefType< int64_t > * | m | ) |
Definition at line 92 of file RunnerUtils.cpp.
References impl::printMemRef().
Referenced by printMemrefI64().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefI8 | ( | UnrankedMemRefType< int8_t > * | m | ) |
Definition at line 80 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefInd | ( | UnrankedMemRefType< impl::index_type > * | m | ) |
Definition at line 113 of file RunnerUtils.cpp.
References impl::printMemRef().
Referenced by printMemrefInd().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefShapeC32 | ( | UnrankedMemRefType< impl::complex32 > * | m | ) |
Definition at line 62 of file RunnerUtils.cpp.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefShapeC64 | ( | UnrankedMemRefType< impl::complex64 > * | m | ) |
Definition at line 69 of file RunnerUtils.cpp.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefShapeF32 | ( | UnrankedMemRefType< float > * | m | ) |
Definition at line 41 of file RunnerUtils.cpp.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefShapeF64 | ( | UnrankedMemRefType< double > * | m | ) |
Definition at line 48 of file RunnerUtils.cpp.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefShapeI32 | ( | UnrankedMemRefType< int32_t > * | m | ) |
Definition at line 28 of file RunnerUtils.cpp.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefShapeI64 | ( | UnrankedMemRefType< int64_t > * | m | ) |
Definition at line 35 of file RunnerUtils.cpp.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefShapeI8 | ( | UnrankedMemRefType< int8_t > * | m | ) |
Definition at line 21 of file RunnerUtils.cpp.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefShapeInd | ( | UnrankedMemRefType< impl::index_type > * | m | ) |
Definition at line 55 of file RunnerUtils.cpp.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT void _mlir_ciface_printMemrefVector4x4xf32 | ( | StridedMemRefType< Vector2D< 4, 4, float >, 2 > * | m | ) |
Definition at line 75 of file RunnerUtils.cpp.
References impl::printMemRef().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefBF16 | ( | UnrankedMemRefType< bf16 > * | actual, |
UnrankedMemRefType< bf16 > * | expected | ||
) |
Definition at line 253 of file RunnerUtils.cpp.
References impl::verifyMemRef().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefC32 | ( | UnrankedMemRefType< impl::complex32 > * | actual, |
UnrankedMemRefType< impl::complex32 > * | expected | ||
) |
Definition at line 277 of file RunnerUtils.cpp.
References impl::verifyMemRef().
Referenced by verifyMemRefC32().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefC64 | ( | UnrankedMemRefType< impl::complex64 > * | actual, |
UnrankedMemRefType< impl::complex64 > * | expected | ||
) |
Definition at line 283 of file RunnerUtils.cpp.
References impl::verifyMemRef().
Referenced by verifyMemRefC64().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefF16 | ( | UnrankedMemRefType< f16 > * | actual, |
UnrankedMemRefType< f16 > * | expected | ||
) |
Definition at line 247 of file RunnerUtils.cpp.
References impl::verifyMemRef().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefF32 | ( | UnrankedMemRefType< float > * | actual, |
UnrankedMemRefType< float > * | expected | ||
) |
Definition at line 259 of file RunnerUtils.cpp.
References impl::verifyMemRef().
Referenced by verifyMemRefF32().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefF64 | ( | UnrankedMemRefType< double > * | actual, |
UnrankedMemRefType< double > * | expected | ||
) |
Definition at line 265 of file RunnerUtils.cpp.
References impl::verifyMemRef().
Referenced by verifyMemRefF64().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefI16 | ( | UnrankedMemRefType< int16_t > * | actual, |
UnrankedMemRefType< int16_t > * | expected | ||
) |
Definition at line 229 of file RunnerUtils.cpp.
References impl::verifyMemRef().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefI32 | ( | UnrankedMemRefType< int32_t > * | actual, |
UnrankedMemRefType< int32_t > * | expected | ||
) |
Definition at line 235 of file RunnerUtils.cpp.
References impl::verifyMemRef().
Referenced by verifyMemRefI32().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefI64 | ( | UnrankedMemRefType< int64_t > * | actual, |
UnrankedMemRefType< int64_t > * | expected | ||
) |
Definition at line 241 of file RunnerUtils.cpp.
References impl::verifyMemRef().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefI8 | ( | UnrankedMemRefType< int8_t > * | actual, |
UnrankedMemRefType< int8_t > * | expected | ||
) |
Definition at line 223 of file RunnerUtils.cpp.
References impl::verifyMemRef().
MLIR_RUNNERUTILS_EXPORT int64_t _mlir_ciface_verifyMemRefInd | ( | UnrankedMemRefType< impl::index_type > * | actual, |
UnrankedMemRefType< impl::index_type > * | expected | ||
) |
Definition at line 271 of file RunnerUtils.cpp.
References impl::verifyMemRef().
Referenced by verifyMemRefInd().
MLIR_RUNNERUTILS_EXPORT void printMemrefC32 | ( | int64_t | rank, |
void * | ptr | ||
) |
Definition at line 163 of file RunnerUtils.cpp.
References _mlir_ciface_printMemrefC32().
MLIR_RUNNERUTILS_EXPORT void printMemrefC64 | ( | int64_t | rank, |
void * | ptr | ||
) |
Definition at line 168 of file RunnerUtils.cpp.
References _mlir_ciface_printMemrefC64().
MLIR_RUNNERUTILS_EXPORT void printMemrefF32 | ( | int64_t | rank, |
void * | ptr | ||
) |
Definition at line 145 of file RunnerUtils.cpp.
References _mlir_ciface_printMemrefF32().
MLIR_RUNNERUTILS_EXPORT void printMemrefF64 | ( | int64_t | rank, |
void * | ptr | ||
) |
Definition at line 150 of file RunnerUtils.cpp.
References _mlir_ciface_printMemrefF64().
MLIR_RUNNERUTILS_EXPORT void printMemrefI32 | ( | int64_t | rank, |
void * | ptr | ||
) |
Definition at line 135 of file RunnerUtils.cpp.
References _mlir_ciface_printMemrefI32().
MLIR_RUNNERUTILS_EXPORT void printMemrefI64 | ( | int64_t | rank, |
void * | ptr | ||
) |
Definition at line 140 of file RunnerUtils.cpp.
References _mlir_ciface_printMemrefI64().
MLIR_RUNNERUTILS_EXPORT void printMemrefInd | ( | int64_t | rank, |
void * | ptr | ||
) |
Definition at line 158 of file RunnerUtils.cpp.
References _mlir_ciface_printMemrefInd().
void printMemRefMetaData | ( | StreamType & | os, |
const DynamicMemRefType< T > & | v | ||
) |
Definition at line 44 of file RunnerUtils.h.
References DynamicMemRefType< T >::data, DynamicMemRefType< T >::offset, print(), DynamicMemRefType< T >::rank, DynamicMemRefType< T >::sizes, and DynamicMemRefType< T >::strides.
Referenced by _mlir_ciface_printMemrefShapeC32(), _mlir_ciface_printMemrefShapeC64(), _mlir_ciface_printMemrefShapeF32(), _mlir_ciface_printMemrefShapeF64(), _mlir_ciface_printMemrefShapeI32(), _mlir_ciface_printMemrefShapeI64(), _mlir_ciface_printMemrefShapeI8(), _mlir_ciface_printMemrefShapeInd(), printMemRefMetaData(), printUnrankedMemRefMetaData(), and impl::verifyMemRef().
void printMemRefMetaData | ( | StreamType & | os, |
StridedMemRefType< T, N > & | v | ||
) |
Definition at line 65 of file RunnerUtils.h.
References printMemRefMetaData().
void printUnrankedMemRefMetaData | ( | StreamType & | os, |
UnrankedMemRefType< T > & | v | ||
) |
Definition at line 72 of file RunnerUtils.h.
References printMemRefMetaData().
MLIR_RUNNERUTILS_EXPORT int64_t verifyMemRefC32 | ( | int64_t | rank, |
void * | actualPtr, | ||
void * | expectedPtr | ||
) |
Definition at line 316 of file RunnerUtils.cpp.
References _mlir_ciface_verifyMemRefC32().
MLIR_RUNNERUTILS_EXPORT int64_t verifyMemRefC64 | ( | int64_t | rank, |
void * | actualPtr, | ||
void * | expectedPtr | ||
) |
Definition at line 323 of file RunnerUtils.cpp.
References _mlir_ciface_verifyMemRefC64().
MLIR_RUNNERUTILS_EXPORT int64_t verifyMemRefF32 | ( | int64_t | rank, |
void * | actualPtr, | ||
void * | expectedPtr | ||
) |
Definition at line 295 of file RunnerUtils.cpp.
References _mlir_ciface_verifyMemRefF32().
MLIR_RUNNERUTILS_EXPORT int64_t verifyMemRefF64 | ( | int64_t | rank, |
void * | actualPtr, | ||
void * | expectedPtr | ||
) |
Definition at line 302 of file RunnerUtils.cpp.
References _mlir_ciface_verifyMemRefF64().
MLIR_RUNNERUTILS_EXPORT int64_t verifyMemRefI32 | ( | int64_t | rank, |
void * | actualPtr, | ||
void * | expectedPtr | ||
) |
Definition at line 288 of file RunnerUtils.cpp.
References _mlir_ciface_verifyMemRefI32().
MLIR_RUNNERUTILS_EXPORT int64_t verifyMemRefInd | ( | int64_t | rank, |
void * | actualPtr, | ||
void * | expectedPtr | ||
) |
Definition at line 309 of file RunnerUtils.cpp.
References _mlir_ciface_verifyMemRefInd().