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/streams-submit.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 / streams-submit.mk` 27 lines · 2508 bytes Raw Blame History 1 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 # HOST_ONLY: GPFIFO entry, USERD GPPut and doorbell stores (native/streams/submit.om) 3 # on memfd fake-device pages; C oracle (CUDAPP_MIGRATION_PENDING_C_SUBMIT=1) vs Omega. 4 CUDAPP_MIGRATION_PENDING_C_SUBMIT ?= 0 5 CFLAGS += -DCUDAPP_MIGRATION_PENDING_C_SUBMIT=$(CUDAPP_MIGRATION_PENDING_C_SUBMIT) 6 CARRIED_HOST_TESTS += test-streams-submit 7 .PHONY: test-streams-submit test-streams-submit-mutants 8 STREAMS_SUBMIT_DEPS = nvrm/submit_test.c nvrm/native_client.h nvrm/nvrm.c nvrm/nvrm.h src/cudapp_nvrm_native.h src/cudapp_om_nvrm_transport.c src/omega_ampere_qmd.c src/cudapp_om_amp_runtime.c src/cudapp_om_amp_qmd.c $(NVRM_SERIALIZER_SRCS) $(NVRM_ADMIT_SRCS) 9 STREAMS_SUBMIT_LINK = src/omega_ampere_qmd.c src/cudapp_om_amp_runtime.c src/cudapp_om_amp_qmd.c $(NVRM_SERIALIZER_SRCS) $(NVRM_ADMIT_SRCS) 10 $(OUT_DIR)/streams-submit-omega: $(STREAMS_SUBMIT_DEPS) 11 @mkdir -p $(OUT_DIR) 12 $(CC) $(CFLAGS) -UCUDAPP_MIGRATION_PENDING_C_NVRM -DCUDAPP_MIGRATION_PENDING_C_NVRM=0 -UCUDAPP_MIGRATION_PENDING_C_SUBMIT -DCUDAPP_MIGRATION_PENDING_C_SUBMIT=0 -o $@ nvrm/submit_test.c src/cudapp_om_nvrm_transport.c $(STREAMS_SUBMIT_LINK) 13 $(OUT_DIR)/streams-submit-c: $(STREAMS_SUBMIT_DEPS) 14 @mkdir -p $(OUT_DIR) 15 $(CC) $(CFLAGS) -UCUDAPP_MIGRATION_PENDING_C_NVRM -DCUDAPP_MIGRATION_PENDING_C_NVRM=0 -UCUDAPP_MIGRATION_PENDING_C_SUBMIT -DCUDAPP_MIGRATION_PENDING_C_SUBMIT=1 -o $@ nvrm/submit_test.c src/cudapp_om_nvrm_transport.c $(STREAMS_SUBMIT_LINK) 16 test-streams-submit: $(OUT_DIR)/streams-submit-omega $(OUT_DIR)/streams-submit-c 17 ./$(OUT_DIR)/streams-submit-c $(OUT_DIR)/streams-submit-c.img 18 ./$(OUT_DIR)/streams-submit-omega $(OUT_DIR)/streams-submit-omega.img 19 cmp $(OUT_DIR)/streams-submit-c.img $(OUT_DIR)/streams-submit-omega.img 20 @cp $(OUT_DIR)/streams-submit-omega.img $(OUT_DIR)/streams-submit-red.img 21 @printf '\001' | dd of=$(OUT_DIR)/streams-submit-red.img bs=1 seek=8 conv=notrunc status=none 22 @if cmp -s $(OUT_DIR)/streams-submit-c.img $(OUT_DIR)/streams-submit-red.img; then echo "FAIL: image compare accepted a changed GP entry byte"; exit 1; fi 23 @echo "STREAMS SUBMIT PASS (2000x2 submits, wrap at 2^32 on a 6-entry ring: C and Omega stores byte-identical; red image refused; HOST_ONLY)" 24 # Needs the pinned generator toolchain (native/nvrm/units.sh variables); regenerates 25 # AArch64 only from a mutated submit.om and expects the fixture to fail. 26 test-streams-submit-mutants: 27 STREAMS_SUBMIT_LINK='$(STREAMS_SUBMIT_LINK)' sh tests/streams_submit_mutants.sh