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
CUDApp / mk / carried-tests.mk
| 1 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | # Build rules for the GPU tests carried from aien-dev/omega-mv main e5b32567 (the rules are |
| 3 | # omega-mv's Makefile rules for the same files, unchanged apart from living here). Picked up by |
| 4 | # the `-include mk/*.mk` line of the Makefile, before it sets HOST_TESTS, which lists |
| 5 | # $(CARRIED_HOST_TESTS). The C3 tests (gpu_scan_test, gpu_gemm_test) have their rules in mk/c3.mk. |
| 6 | # Host-only targets open no device; the chip tiers run the same binaries with no flag, under the GB10 lock. |
| 7 | |
| 8 | BW_ENCODE_CONTROL_TEST = $(OUT_DIR)/bw_encode_control_test |
| 9 | $(BW_ENCODE_CONTROL_TEST): tests/bw_encode_control_test.c src/omega_blackwell_codegen.h $(OUT_DIR)/libomega_gpu.a |
| 10 | $(CC) $(CFLAGS) -o $@ tests/bw_encode_control_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 11 | |
| 12 | # Qwen3.8-27B decode attention, head_dim 256 (omega-mv#544). |
| 13 | GPU_DATTN256_TEST = $(OUT_DIR)/gpu_decode_attn256_test |
| 14 | $(GPU_DATTN256_TEST): tests/gpu_decode_attn256_test.c tests/bw_warp_sim_k.h src/omega_gpu_decode_attn256_api.h src/omega_blackwell_codegen_attn256.h $(OUT_DIR)/libomega_gpu.a |
| 15 | $(CC) $(CFLAGS) -ffp-contract=off -Itests -o $@ tests/gpu_decode_attn256_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 16 | GPU_DATTN256_MULTI_TEST = $(OUT_DIR)/gpu_dattn256_multi_test |
| 17 | $(GPU_DATTN256_MULTI_TEST): tests/gpu_dattn256_multi_test.c src/omega_gpu_decode_attn256_api.h src/omega_blackwell_codegen_attn256.h $(OUT_DIR)/libomega_gpu.a |
| 18 | $(CC) $(CFLAGS) -Itests -o $@ tests/gpu_dattn256_multi_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 19 | |
| 20 | # Qwen3.8-27B Gated DeltaNet decode step (omega#542). |
| 21 | GPU_GDN_TEST = $(OUT_DIR)/gpu_gdn_test |
| 22 | $(GPU_GDN_TEST): tests/gpu_gdn_test.c tests/bw_warp_sim_k.h src/omega_gpu_gdn_api.h src/omega_blackwell_codegen_gdn.h $(OUT_DIR)/libomega_gpu.a |
| 23 | $(CC) $(CFLAGS) -ffp-contract=off -Itests -o $@ tests/gpu_gdn_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 24 | GPU_GDN_MULTI_TEST = $(OUT_DIR)/gpu_gdn_multi_test |
| 25 | $(GPU_GDN_MULTI_TEST): tests/gpu_gdn_multi_test.c tests/bw_warp_sim_k.h src/omega_gpu_gdn_api.h src/omega_blackwell_codegen_gdn.h $(OUT_DIR)/libomega_gpu.a |
| 26 | $(CC) $(CFLAGS) -ffp-contract=off -Itests -o $@ tests/gpu_gdn_multi_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 27 | |
| 28 | # Qwen3.8-27B prefill attention, head_dim 256 (omega-mv#545). |
| 29 | GPU_PATTN256_TEST = $(OUT_DIR)/gpu_prefill_attn256_test |
| 30 | $(GPU_PATTN256_TEST): tests/gpu_prefill_attn256_test.c tests/bw_hmma_model.h tests/bw_warp_sim_pa.h src/omega_gpu_prefill_attn256_api.h src/omega_blackwell_codegen_pattn256.h src/omega_blackwell_codegen_attn256.h $(OUT_DIR)/libomega_gpu.a |
| 31 | $(CC) $(CFLAGS) -ffp-contract=off -DWS_MAX_THREADS=256 -Itests -o $@ tests/gpu_prefill_attn256_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 32 | |
| 33 | # Qwen3.8-27B decode graph (sc #642) and the exact two-pass lm_head (HUM L314). |
| 34 | GPU_Q38_GRAPH_TEST = $(OUT_DIR)/gpu_q38_graph_test |
| 35 | $(GPU_Q38_GRAPH_TEST): tests/gpu_q38_graph_test.c src/omega_gpu_q38_graph.h $(OUT_DIR)/libomega_gpu.a |
| 36 | $(CC) $(CFLAGS) -ffp-contract=off -o $@ tests/gpu_q38_graph_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 37 | GPU_EXACT_HEAD_TEST = $(OUT_DIR)/gpu_exact_head_test |
| 38 | $(GPU_EXACT_HEAD_TEST): tests/gpu_exact_head_test.c tests/bw_warp_sim_k.h src/omega_blackwell_codegen_dec.h src/omega_gpu_bf16_gemv_api.h src/omega_gpu_fp8_api.h $(OUT_DIR)/libomega_gpu.a |
| 39 | $(CC) $(CFLAGS) -ffp-contract=off -Itests -o $@ tests/gpu_exact_head_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 40 | |
| 41 | # C4 streams and C5 isolation (docs/OMEGA.md rows C4, C5 in omega-mv). |
| 42 | GPU_STREAMS_TEST = $(OUT_DIR)/gpu_streams_test |
| 43 | $(GPU_STREAMS_TEST): tests/gpu_streams_test.c tests/bw_warp_sim.h src/omega_gpu_cmdlist.h src/omega_bw_em.h $(OUT_DIR)/libomega_gpu.a |
| 44 | $(CC) $(CFLAGS) -ffp-contract=off -Itests -o $@ tests/gpu_streams_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 45 | GPU_ISOLATION_TEST = $(OUT_DIR)/gpu_isolation_test |
| 46 | $(GPU_ISOLATION_TEST): tests/gpu_isolation_test.c tests/bw_warp_sim.h src/omega_gpu_session.h src/omega_bw_em.h $(OUT_DIR)/libomega_gpu.a |
| 47 | $(CC) $(CFLAGS) -ffp-contract=off -Itests -o $@ tests/gpu_isolation_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 48 | |
| 49 | .PHONY: test-bw-encode-control test-gpu-decode-attn256 test-gpu-gdn test-gpu-q38-graph-host test-gpu-streams \ |
| 50 | test-gpu-isolation test-carried-bins |
| 51 | test-bw-encode-control: $(BW_ENCODE_CONTROL_TEST) |
| 52 | ./$(BW_ENCODE_CONTROL_TEST) |
| 53 | test-gpu-decode-attn256: $(GPU_DATTN256_TEST) |
| 54 | ./$(GPU_DATTN256_TEST) --host-only |
| 55 | ./$(GPU_DATTN256_TEST) --sim |
| 56 | test-gpu-gdn: $(GPU_GDN_TEST) |
| 57 | ./$(GPU_GDN_TEST) --host-only |
| 58 | ./$(GPU_GDN_TEST) --sim |
| 59 | test-gpu-q38-graph-host: $(GPU_Q38_GRAPH_TEST) |
| 60 | ./$(GPU_Q38_GRAPH_TEST) --host-only |
| 61 | test-gpu-streams: $(GPU_STREAMS_TEST) |
| 62 | ./$(GPU_STREAMS_TEST) --sim |
| 63 | test-gpu-isolation: $(GPU_ISOLATION_TEST) |
| 64 | ./$(GPU_ISOLATION_TEST) --host-only |
| 65 | # Chip-only binaries: built here so the host suite at least compiles them. |
| 66 | test-carried-bins: $(GPU_DATTN256_MULTI_TEST) $(GPU_GDN_MULTI_TEST) $(GPU_PATTN256_TEST) $(GPU_EXACT_HEAD_TEST) |
| 67 | |
| 68 | # Other fragments may register tests before this file in the wildcard include order. |
| 69 | CARRIED_HOST_TESTS += test-bw-encode-control test-gpu-decode-attn256 test-gpu-gdn test-gpu-q38-graph-host \ |
| 70 | test-gpu-streams test-gpu-isolation test-carried-bins |