diff --git a/analytics_tools/graphing/graph.py b/analytics_tools/graphing/graph.py index 1dc2b24..01c0c91 100644 --- a/analytics_tools/graphing/graph.py +++ b/analytics_tools/graphing/graph.py @@ -335,7 +335,7 @@ def aggregate(data): plt.tick_params(axis="y", which="both", length=0) level_name = level.__name__.replace("_", " ").capitalize() - plt.title(f"{level_name} Geomean of runtime of {lib} / {EXOBLAS_NAME}" + f" ({BACKEND})") + plt.title(f"Runtime of {lib} / {EXOBLAS_NAME}" + f" ({BACKEND})") plt.xlabel("N") nrows, ncols = data.shape @@ -347,10 +347,10 @@ def aggregate(data): level_dir = GRAPHS_DIR / "all" / level.__name__ level_dir.mkdir(parents=True, exist_ok=True) filename = level_dir / f"{bench_type.name}_p{p}_disc_gmean_{lib}_x_ExoBLAS" - png_path = filename.with_suffix('.png') + #png_path = filename.with_suffix('.png') pdf_path = filename.with_suffix('.pdf') - plt.savefig(png_path) + #plt.savefig(png_path) plt.savefig(pdf_path) diff --git a/analytics_tools/graphing/organize.sh b/analytics_tools/graphing/organize.sh new file mode 100644 index 0000000..e7b10d2 --- /dev/null +++ b/analytics_tools/graphing/organize.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# Check if the directory path is provided +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +DIR="$1" + +# Create level1 and level2 directories inside the provided directory +mkdir -p "$DIR/level1" +mkdir -p "$DIR/level2" + +# List of subdirectories to copy +SUBDIRS=("exo" "FLAME" "Intel10_64lp_seq" "OpenBLAS") + +# Copy the subdirectories into level1 and level2 +for SUBDIR in "${SUBDIRS[@]}"; do + cp -r "$DIR/$SUBDIR" "$DIR/level1/" + cp -r "$DIR/$SUBDIR" "$DIR/level2/" +done + +# BLAS Level 1 operations +LEVEL1_OPS=( + "asum.json" "axpy.json" "copy.json" "dot.json" "dsdot.json" + "rot.json" "rotm.json" "sdsdot.json" "scal.json" "swap.json" +) + +# Files to keep in level2 +LEVEL2_KEEP=( + "gemv.json" "ger.json" "symv.json" "syr2.json" + "syr.json" "trmv.json" "trsv.json" +) + +# Function to delete files not in a given list +delete_unwanted_files() { + local TARGET_DIR="$1" + shift + local KEEP_FILES=("$@") + + for SUBDIR in "${SUBDIRS[@]}"; do + for FILE in "$TARGET_DIR/$SUBDIR/"*.json; do + BASENAME=$(basename "$FILE") + if [[ ! " ${KEEP_FILES[@]} " =~ " $BASENAME " ]]; then + rm -f "$FILE" + fi + done + done +} + +# Delete unwanted files in level1 +delete_unwanted_files "$DIR/level1" "${LEVEL1_OPS[@]}" + +# Delete unwanted files in level2 +delete_unwanted_files "$DIR/level2" "${LEVEL2_KEEP[@]}"