Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/mk/codegen-pfhost.mk # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / mk / codegen-pfhost.mk` 38 lines · 2644 bytes Raw Blame History 1 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 CARRIED_HOST_TESTS += test-codegen-pfhost 3 .PHONY: test-codegen-pfhost 4 PFHOST_ORACLE_RENAMES = -Domega_rl_spec_ok=omega_rl_spec_ok_c -Domega_rl_shared_bytes=omega_rl_shared_bytes_c -Domega_mc_spec_ok=omega_mc_spec_ok_c -Domega_blackwell_codegen_rl_prog=omega_blackwell_codegen_rl_prog_c -Domega_blackwell_codegen_mc_prog=omega_blackwell_codegen_mc_prog_c 5 $(OUT_DIR)/codegen_pfhost_oracle.o: src/omega_blackwell_codegen_pfhost.c 6 @mkdir -p $(OUT_DIR) 7 $(CC) $(CFLAGS) -DCUDAPP_MIGRATION_PENDING_C_CODEGEN_PFHOST=1 -UCUDAPP_MIGRATION_PENDING_C_CODEGEN_PFHOST_ADMIT -DCUDAPP_MIGRATION_PENDING_C_CODEGEN_PFHOST_ADMIT=1 $(PFHOST_ORACLE_RENAMES) -c $< -o $@ 8 $(OUT_DIR)/codegen_pfhost_diff: tests/codegen_pfhost_diff.c $(OUT_DIR)/codegen_pfhost_oracle.o $(OUT_DIR)/libomega_gpu.a 9 $(CC) $(CFLAGS) -Itests -Isrc -o $@ $^ -lpthread -lm 10 test-codegen-pfhost: $(OUT_DIR)/codegen_pfhost_diff 11 $(OUT_DIR)/codegen_pfhost_diff 12 ifeq ($(CUDAPP_OMC_HOST),1) 13 OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 tests/codegen_pfhost_mutants.py $(OUT_DIR) 14 else 15 @echo "NOT_RUN pfhost source mutants (requires the pinned compiler; checked-C differential ran)" 16 endif 17 18 CUDAPP_MIGRATION_PENDING_C_CODEGEN_PFHOST_ADMIT ?= 0 19 CFLAGS += -DCUDAPP_MIGRATION_PENDING_C_CODEGEN_PFHOST_ADMIT=$(CUDAPP_MIGRATION_PENDING_C_CODEGEN_PFHOST_ADMIT) 20 CARRIED_HOST_TESTS += test-codegen-pfhost-admit 21 $(OUT_DIR)/codegen_pfhost_admit_diff: tests/codegen_pfhost_admit_diff.c $(OUT_DIR)/codegen_pfhost_oracle.o $(OUT_DIR)/libomega_gpu.a 22 $(CC) $(CFLAGS) -o $@ $^ -lpthread -lm 23 .PHONY: test-codegen-pfhost-admit 24 test-codegen-pfhost-admit: $(OUT_DIR)/codegen_pfhost_admit_diff 25 ./$(OUT_DIR)/codegen_pfhost_admit_diff 26 @if ./$(OUT_DIR)/codegen_pfhost_admit_diff --red; then exit 1; else echo 'PFHOST-ADMIT-RED PASS'; fi 27 28 CARRIED_HOST_TESTS += test-codegen-pfhost-admit-cubin test-codegen-pfhost-admit-mutants 29 $(OUT_DIR)/codegen_pfhost_admit_cubin: tests/codegen_pfhost_admit_cubin.c $(OUT_DIR)/codegen_pfhost_oracle.o $(OUT_DIR)/libomega_gpu.a 30 $(CC) $(CFLAGS) -o $@ $^ -lpthread -lm 31 .PHONY: test-codegen-pfhost-admit-cubin test-codegen-pfhost-admit-mutants 32 test-codegen-pfhost-admit-cubin: $(OUT_DIR)/codegen_pfhost_admit_cubin 33 ./$(OUT_DIR)/codegen_pfhost_admit_cubin 34 # Converts .om through the bridge's seeded converter, which executes the pinned AArch64 omc. 35 CUDAPP_TARGET_ONLY_TESTS += $(if $(CUDAPP_OMC_HOST),,test-codegen-pfhost-admit-mutants) 36 test-codegen-pfhost-admit-mutants: $(OUT_DIR)/codegen_pfhost_admit_diff 37 @$(CUDAPP_REQUIRE_OMC) 38 OUT_DIR="$(OUT_DIR)" python3 tests/codegen_pfhost_admit_mutants.py