interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / mk / om-bw-matmul.mk

21 lines · 1486 bytes Raw Blame History
1# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2BW_DIFF_SRCS = tests/om_bw_diff_test.c tests/om_bw_matmul_oracle.c tests/om_bw_realize_oracle.c
3BW_DIFF_FLAGS = -std=gnu11 -O0 -g -Wall -Wextra -Werror -ffp-contract=off -Isrc -DCUDAPP_MIGRATION_PENDING_BW_MATMUL=1
4BW_DIFF_DEPS = $(BW_DIFF_SRCS) src/omega_bw_policy.h src/omega_blackwell_matmul.h $(OUT_DIR)/libomega_gpu.a
5.PHONY: test-om-bw-matmul test-om-bw-matmul-mutants test-om-bw-matmul-coverage
6$(OUT_DIR)/om_bw_diff: $(BW_DIFF_DEPS)
7 $(CC) $(BW_DIFF_FLAGS) -o $@ $(BW_DIFF_SRCS) $(OUT_DIR)/libomega_gpu.a -lpthread -lm
8$(OUT_DIR)/om_bw_diff_red: $(BW_DIFF_DEPS)
9 $(CC) $(BW_DIFF_FLAGS) -DOMEGA_BW_DIFF_RED=1 -o $@ $(BW_DIFF_SRCS) $(OUT_DIR)/libomega_gpu.a -lpthread -lm
10test-om-bw-matmul: $(OUT_DIR)/om_bw_diff $(OUT_DIR)/om_bw_diff_red
11 ./$(OUT_DIR)/om_bw_diff
12 @rc=0; ./$(OUT_DIR)/om_bw_diff_red >$(OUT_DIR)/om_bw_diff_red.log 2>&1 || rc=$$?; test $$rc = 1
13 @echo 'PASS bw differential red check killed'
14test-om-bw-matmul-mutants: $(OUT_DIR)/libomega_gpu.a
15 python3 tests/om_bw_mutants.py
16test-om-bw-matmul-coverage: $(OUT_DIR)/libomega_gpu.a
17 @mkdir -p $(OUT_DIR)/om-bw-coverage
18 rm -f $(OUT_DIR)/om-bw-coverage/diff-*.gcda
19 $(CC) $(BW_DIFF_FLAGS) --coverage -o $(OUT_DIR)/om-bw-coverage/diff $(foreach s,$(BW_DIFF_SRCS),$(abspath $(s))) $(OUT_DIR)/libomega_gpu.a -lpthread -lm
20 ./$(OUT_DIR)/om-bw-coverage/diff
21 cd $(OUT_DIR)/om-bw-coverage && gcov -b -c diff-om_bw_matmul_oracle.gcno diff-om_bw_realize_oracle.gcno