diff --git a/pact/experiments/layout/generate_tests.py b/pact/experiments/layout/generate_tests.py index d0ab929f..f3cdcc2e 100644 --- a/pact/experiments/layout/generate_tests.py +++ b/pact/experiments/layout/generate_tests.py @@ -22,9 +22,9 @@ class UnsupportedCombinationException(Exception): [32, 32, 32], # ops = 32*32*32 = 32768 # [64, 24, 16], # [64, 24, 48], - # [32, 32, 64], # ops = 32*32*64 = 65536 - # [32, 64, 64], # ops = 32*64*64 = 131072 - # [64, 64, 64], # ops = 64*64*64 = 262144 + [32, 32, 64], # ops = 32*32*64 = 65536 + [32, 64, 64], # ops = 32*64*64 = 131072 + [64, 64, 64], # ops = 64*64*64 = 262144 # [64, 64, 128], # ops = 64*64*128 = 524288 # [64, 128, 128], # ops = 64*128*128 = 1048576 # [128, 128, 128], # ops = 128*128*128 = 2097152 @@ -40,6 +40,7 @@ class UnsupportedCombinationException(Exception): # 'cpu', # cpu golden model # 'base', # base system (no streamers) "fifo-0", # streamer with a fifo depth of 0 + "fifo-1-slow", "fifo-1", # streamer with a fifo depth of 1 "fifo-2", # streamer with a fifo depth of 2 "fifo-3", # streamer with a fifo depth of 3 @@ -133,6 +134,8 @@ def generate_makefile(layout, backend): runtime_backend = "snax-gemm" elif backend == "fifo-0": runtime_backend = "snax-streamer-gemm-fifo-0" + elif backend == "fifo-1-slow": + runtime_backend = "snax-streamer-gemm-fifo-1-slow" elif backend == "fifo-1": runtime_backend = "snax-streamer-gemm-fifo-1" elif backend == "fifo-2": diff --git a/pact/experiments/layout/parse_logs.py b/pact/experiments/layout/parse_logs.py index 81fd2452..94647a2c 100644 --- a/pact/experiments/layout/parse_logs.py +++ b/pact/experiments/layout/parse_logs.py @@ -16,18 +16,29 @@ file_to_open = os.path.join( directory, d, "matmul.x.logs", "trace_hart_00000000.trace.json" ) - with open(file_to_open) as file: - file = json.load(file) - result = file[2] - name_split = d.split("_") - layout = name_split[2] - backend = name_split[3] - size = "x".join(name_split[4:]) + name_split = d.split("_") + layout = name_split[2] + backend = name_split[3] + size = "x".join(name_split[4:]) + try: + with open(file_to_open) as file: + file = json.load(file) + result = file[2] + + result["test"] = d + result["layout"] = layout + result["backend"] = backend + result["size"] = size + result["success"] = len(file) == 5 + results.append(result) + except Exception as e: + print(f"Error: {e}") + result = {} result["test"] = d result["layout"] = layout result["backend"] = backend result["size"] = size - result["success"] = len(file) == 5 + result["success"] = False results.append(result) # Store results in results.json diff --git a/runtime/snax-streamer-gemm-fifo-1-slow.rules b/runtime/snax-streamer-gemm-fifo-1-slow.rules new file mode 100644 index 00000000..cd6a0787 --- /dev/null +++ b/runtime/snax-streamer-gemm-fifo-1-slow.rules @@ -0,0 +1,5 @@ +# Specific settings for snax-mac RTL +SNITCH_SW_PATH = /opt/snax-gemm +VLTSIM = /opt-fifo-1-slow/snax-streamer-gemm-rtl/bin/snitch_cluster.vlt +CFLAGS += -I$(SNITCH_SW_PATH)/target/snitch_cluster/sw/snax/gemm/include +LDFLAGS += $(SNITCH_SW_PATH)/target/snitch_cluster/sw/snax/gemm/build/snax-gemm-lib.o