Skip to content

Commit d14ab64

Browse files
committed
counter_analysis_toolkit: add CMake support
To accommodate different instruction sets and precisions available in modern architectures, these changes add CMake as a more flexible build system for the Counter Analysis Toolkit. These changes have been tested on the Intel Sapphire Rapids architecture.
1 parent 0bfae40 commit d14ab64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+524
-18
lines changed

src/counter_analysis_toolkit/CMakeLists.txt

Lines changed: 494 additions & 0 deletions
Large diffs are not rendered by default.

src/counter_analysis_toolkit/README

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ Description:
22
Benchmarks for helping in the understanding of native events
33
by stressing different aspects of the architecture selectively.
44

5-
Compilation:
6-
make PAPIDIR=/path/to/your/papi/installation
5+
CMake Compilation (Recommended):
6+
mkdir build && cd build
7+
cmake -Dpapi_dir=/path/to/your/papi/installation ..
78

9+
Legacy Compilation:
10+
make PAPIDIR=/path/to/your/papi/installation
811

912
Usage:
1013
./cat_collect -in event_list.txt -out OUTPUT_DIRECTORY -branch -dcr

src/counter_analysis_toolkit/replicate.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ all: branch.o d_cache eventstock.o flops i_cache instr vector
6666

6767
d_cache: timing_kernels.o prepareArray.o compar.o dcache.o
6868

69-
i_cache: icache.o icache_seq_kernel_0.o
69+
i_cache: icache.o icache_seq_kernel.o
7070

7171
vector: weak_symbols.o vec.o vec_scalar_verify.o $(VECSRC)
7272

@@ -92,15 +92,15 @@ flops: flops.c flops.h cat_arch.h
9292
$(CC) $(CFLAGS) $(FLOP) $(OPT1) $(INCFLAGS) -c flops.c -o flops.o
9393

9494
icache.o: icache.c icache.h
95-
bash gen_seq_dlopen.sh
95+
bash gen_seq_dlopen.sh ${PWD}
9696
$(CC) $(CFLAGS) $(OPT0) $(INCFLAGS) -c icache.c -o icache.o
9797

98-
icache_seq_kernel_0.o: icache_seq.c icache_seq.h
98+
icache_seq_kernel.o: icache_seq.c icache_seq.h icache_seq_kernel.c
9999
$(CC) $(CFLAGS) $(OPT0) $(INCFLAGS) -c icache_seq.c -o icache_seq.o
100-
$(CC) $(CFLAGS) $(OPT0) $(INCFLAGS) -fPIC -c icache_seq_kernel.c -o icache_seq_kernel_0.o
101-
$(CC) $(CFLAGS) $(OPT0) -shared -o icache_seq_kernel_0.so icache_seq_kernel_0.o
102-
bash replicate.sh
103-
rm icache_seq_kernel_0.o
100+
$(CC) $(CFLAGS) $(OPT0) $(INCFLAGS) -fPIC -c icache_seq_kernel.c -o icache_seq_kernel.o
101+
$(CC) $(CFLAGS) $(OPT0) -shared -o icache_seq_kernel_0.so icache_seq_kernel.o
102+
bash replicate.sh ${PWD}
103+
rm ${PWD}/icache_seq_kernel.o
104104

105105
instr: instructions.c instr.h
106106
-$(CC) -c $(CFLAGS) $(OPT2) -ftree-vectorize $(FLOP) $(INSTR) $(INCFLAGS) instructions.c -o instructions.o
File renamed without changes.

0 commit comments

Comments
 (0)