Skip to content

Commit 86ca84f

Browse files
author
Kavitha Madhu
committed
End to end test case and fpcmp tool
1 parent c143a01 commit 86ca84f

File tree

5 files changed

+461
-1
lines changed

5 files changed

+461
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// RUN: export vectorFile=$(mktemp)
2+
// RUN: mlir-gen --kernel=const --bias --relu --layers=16,16 --tiles=4,4,4 -float-type=bf16 --vnni=2 | tpp-run -linalg-to-vector -e entry --entry-point-result=void -print -n 1 --seed=123 2>&1 > $vectorFile
3+
// RUN: export xsmmFile=$(mktemp)
4+
// RUN: mlir-gen --kernel=const --bias --relu --layers=16,16 --tiles=4,4,4 -float-type=bf16 --vnni=2 | tpp-run -e entry --entry-point-result=void -print -n 1 --seed=123 2>&1 > $xsmmFile
5+
// RUN: fpcmp -r 0.09 $vectorFile $xsmmFile

test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@
4747
llvm_config.with_environment("PATH", config.llvm_tools_dir, append_path=True)
4848

4949
tool_dirs = [config.tpp_tools_dir, config.llvm_tools_dir]
50-
tools = ["mlir-gen", "tpp-opt", "tpp-run"]
50+
tools = ["mlir-gen", "tpp-opt", "tpp-run", "fpcmp"]
5151

5252
llvm_config.add_tool_substitutions(tools, tool_dirs)

tools/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
add_subdirectory(mlir-gen)
22
add_subdirectory(tpp-opt)
33
add_subdirectory(tpp-run)
4+
add_subdirectory(fpcmp)
45
add_subdirectory(bench-ref)

tools/fpcmp/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
2+
3+
add_llvm_executable(fpcmp
4+
fpcmp.c)
5+
6+
llvm_update_compile_flags(fpcmp)
7+
8+
install(TARGETS fpcmp RUNTIME DESTINATION bin)

0 commit comments

Comments
 (0)