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 / prefill-shape.mk
| 1 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | CARRIED_HOST_TESTS += test-prefill-shape |
| 3 | .PHONY: test-prefill-shape |
| 4 | $(OUT_DIR)/prefill-shape.so: src/cudapp_om_prefill_shape.c |
| 5 | @mkdir -p $(OUT_DIR) |
| 6 | $(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $< -o $@ |
| 7 | $(OUT_DIR)/prefill-cache-check: om/prefill-shape/cache-check.c $(OUT_DIR)/libomega_gpu.a |
| 8 | $(CC) $(CFLAGS) -o $@ $< $(OUT_DIR)/libomega_gpu.a -Wl,--wrap=omega_gpu_session_alloc_code -lpthread -lm |
| 9 | test-prefill-shape: $(OUT_DIR)/prefill-shape.so $(OUT_DIR)/gpu_qgemm_test $(OUT_DIR)/prefill-cache-check |
| 10 | $(abspath $(OUT_DIR))/prefill-cache-check |
| 11 | python3 om/prefill-shape/check.py $(abspath $(OUT_DIR))/prefill-shape.so |
| 12 | $(abspath $(OUT_DIR))/gpu_qgemm_test --host-only |
| 13 | $(abspath $(OUT_DIR))/gpu_qgemm_test --sim |
| 14 | ifeq ($(CUDAPP_OMC_HOST),1) |
| 15 | OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/prefill-shape/mutants.py |
| 16 | endif |
| 17 | |
| 18 | CARRIED_HOST_TESTS += test-prefill-order |
| 19 | .PHONY: test-prefill-order |
| 20 | $(OUT_DIR)/prefill-order.so: src/cudapp_om_prefill_order.c |
| 21 | @mkdir -p $(OUT_DIR) |
| 22 | $(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $< -o $@ |
| 23 | test-prefill-order: $(OUT_DIR)/prefill-order.so $(OUT_DIR)/gpu_qgemm_test |
| 24 | python3 om/prefill-shape/order-check.py $(abspath $(OUT_DIR))/prefill-order.so |
| 25 | ifeq ($(CUDAPP_OMC_HOST),1) |
| 26 | OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/prefill-shape/order-mutants.py |
| 27 | endif |
| 28 | |
| 29 | CARRIED_HOST_TESTS += test-prefill-scoped |
| 30 | .PHONY: test-prefill-scoped |
| 31 | $(OUT_DIR)/prefill-scoped-check: om/prefill-shape/scoped-check.c $(OUT_DIR)/libomega_gpu.a |
| 32 | $(CC) $(CFLAGS) -o $@ $< $(OUT_DIR)/libomega_gpu.a -Wl,--wrap=omega_gpu_pf_open_locked -Wl,--wrap=omega_gpu_pf_kernel_locked -lpthread -lm |
| 33 | test-prefill-scoped: $(OUT_DIR)/prefill-scoped-check |
| 34 | $(abspath $(OUT_DIR))/prefill-scoped-check |
| 35 | CC="$(CC)" python3 om/prefill-shape/scoped-mutants.py $(abspath $(OUT_DIR))/libomega_gpu.a |
| 36 | |
| 37 | CARRIED_HOST_TESTS += test-prefill-reading |
| 38 | .PHONY: test-prefill-reading |
| 39 | $(OUT_DIR)/prefill-reading.so: src/cudapp_om_prefill_reading.c |
| 40 | @mkdir -p $(OUT_DIR) |
| 41 | $(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $< -o $@ |
| 42 | test-prefill-reading: $(OUT_DIR)/prefill-reading.so |
| 43 | python3 om/prefill-shape/reading-check.py $(abspath $(OUT_DIR))/prefill-reading.so |
| 44 | ifeq ($(CUDAPP_OMC_HOST),1) |
| 45 | OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/prefill-shape/reading-mutants.py |
| 46 | endif |
| 47 | |
| 48 | CARRIED_HOST_TESTS += test-prefill-workspace |
| 49 | .PHONY: test-prefill-workspace |
| 50 | $(OUT_DIR)/prefill-workspace.so: src/cudapp_om_prefill_workspace.c |
| 51 | @mkdir -p $(OUT_DIR) |
| 52 | $(CC) $(filter-out -MMD -MP,$(CFLAGS)) -shared -fPIC $< -o $@ |
| 53 | test-prefill-workspace: $(OUT_DIR)/prefill-workspace.so |
| 54 | python3 om/prefill-shape/workspace-check.py $(abspath $(OUT_DIR))/prefill-workspace.so |
| 55 | ifeq ($(CUDAPP_OMC_HOST),1) |
| 56 | OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/prefill-shape/workspace-mutants.py |
| 57 | endif |
| 58 | |
| 59 | CARRIED_HOST_TESTS += test-prefill-host-rest |
| 60 | # The pfhost mutants convert .om through the bridge's seeded converter (pinned AArch64 omc). |
| 61 | CUDAPP_TARGET_ONLY_TESTS += $(if $(CUDAPP_OMC_HOST),,test-prefill-host-rest) |
| 62 | .PHONY: test-prefill-host-rest |
| 63 | test-prefill-host-rest: |
| 64 | @$(CUDAPP_REQUIRE_OMC) |
| 65 | OMEGA_OMC="$(OMEGA_OMC)" OMEGA_BRIDGE="$(OMEGA_BRIDGE)" CC="$(CC)" python3 om/apirest/pfhost-mutants.py |