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 / codegen-moe-ragged.mk
| 1 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | # Ragged-K FP8 GEMV (omega_blackwell_codegen_fp8_gemv_ragged_prog, Qwen3.8-Flash-Next down_proj k = 640). |
| 3 | # test-codegen-moe-ragged: builder-level warp-simulator test. It links the builder sources of mk/codegen-moe.mk (CG_MOE_SRCS) first, so |
| 4 | # CG_MOE_SRC=<mutant.c> replaces the Omega unit (om/codegen/moe_ragged_mutants.py); the library only supplies the pack helpers. |
| 5 | # test-fp8-ragged-api: API selection of the Flash-Next shapes and the seeded host-policy op 25 against its frozen C oracle. |
| 6 | CARRIED_HOST_TESTS += test-codegen-moe-ragged test-fp8-ragged-api |
| 7 | .PHONY: test-codegen-moe-ragged test-fp8-ragged-api |
| 8 | $(OUT_DIR)/codegen_moe_ragged_test: tests/codegen_moe_ragged_test.c tests/bw_warp_sim.h $(CG_MOE_SRCS) $(OUT_DIR)/libomega_gpu.a | $(OUT_DIR) |
| 9 | $(CC) $(CFLAGS) -ffp-contract=off -Itests -ffunction-sections -fdata-sections -Wl,--gc-sections -o $@ tests/codegen_moe_ragged_test.c $(CG_MOE_SRCS) $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 10 | test-codegen-moe-ragged: $(OUT_DIR)/codegen_moe_ragged_test |
| 11 | "$(abspath $<)" |
| 12 | RAGGED_API_OVERRIDE ?= |
| 13 | $(OUT_DIR)/fp8_ragged_api_test: tests/fp8_ragged_api_test.c src/omega_gpu_api_hostrest.h src/omega_gpu_fp8_api.h $(RAGGED_API_OVERRIDE) $(OUT_DIR)/libomega_gpu.a | $(OUT_DIR) |
| 14 | $(CC) $(CFLAGS) -o $@ tests/fp8_ragged_api_test.c $(RAGGED_API_OVERRIDE) $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 15 | test-fp8-ragged-api: $(OUT_DIR)/fp8_ragged_api_test |
| 16 | "$(abspath $<)" |
| 17 | # Source mutants (not in make test, like test-api-plan-mutants): each must be killed by the test's own failure. |
| 18 | .PHONY: test-codegen-moe-ragged-mutants |
| 19 | test-codegen-moe-ragged-mutants: $(OUT_DIR)/libomega_gpu.a |
| 20 | bwrap --dev-bind / / --dev /dev --proc /proc -- taskset -c 10-14 nice -n 10 python3 om/codegen/moe_ragged_mutants.py |
| 21 | # One real expert of the Flash-Next checkpoint (needs the checkpoint on disk and python3; NOT_RUN without them, so not in make test). |
| 22 | .PHONY: test-flash-expert-real |
| 23 | $(OUT_DIR)/flash_expert_real_test: tests/flash_expert_real_test.c tests/fp8_sim_gemv.h tests/bw_warp_sim.h $(OUT_DIR)/libomega_gpu.a | $(OUT_DIR) |
| 24 | $(CC) $(CFLAGS) -ffp-contract=off -Itests -o $@ tests/flash_expert_real_test.c $(OUT_DIR)/libomega_gpu.a -lpthread -lm |
| 25 | test-flash-expert-real: $(OUT_DIR)/flash_expert_real_test |
| 26 | FLASH_EXPERT_BIN="$(abspath $<)" sh tests/flash_expert/run.sh |