interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / mk / dx-doctor.mk

20 lines · 1538 bytes Raw Blame History
1# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2# Developer bar D2 and D6 (docs/PAIN_POINTS.md): `make doctor` says, in sentences, whether this
3# machine can run CUDA++ and what to do if not. It reads files under /proc, /sys and /dev only:
4# it opens no device and needs no GPU window. `make hello-gpu` runs it first.
5DOCTOR = $(OUT_DIR)/cudapp-doctor
6# The one version CUDA++ has to match: the NVIDIA open kernel module whose headers it is built
7# against. Taken from the folder name, so there is exactly one place it is written.
8CUDAPP_NVIDIA_OPEN_ABI := $(patsubst nvidia-open-%,%,$(notdir $(NVIDIA_OPEN)))
9
10.PHONY: doctor test-doctor
11# The checklist itself is the seeded Omega unit om/tools/doctor.om (src/cudapp_om_doctor.c, from sh om/units.sh);
12# cudapp_doctor.c probes and passes the facts in. src/omega_gpu_chip.c also holds the library admission, which calls
13# the generated om/admission/chip_admit.om unit.
14$(DOCTOR): tools/doctor/cudapp_doctor.c src/cudapp_om_doctor.c $(wildcard src/omega_gpu_chip.c src/omega_gpu_chip.h src/omega_chip_enum.h src/cudapp_om_chip_admit.c src/cudapp_om_chip_enum.c) | $(OUT_DIR)
15 $(CC) $(CFLAGS) -DCUDAPP_NVIDIA_OPEN_ABI='"$(CUDAPP_NVIDIA_OPEN_ABI)"' -o $@ tools/doctor/cudapp_doctor.c src/cudapp_om_doctor.c \
16 $(wildcard src/omega_gpu_chip.c src/cudapp_om_chip_admit.c src/cudapp_om_chip_enum.c)
17doctor: $(DOCTOR)
18 $(DOCTOR); rc=$$?; sh tools/multitarget/targets-doctor.sh '$(OMC)' $(OUT_DIR)/multitarget || rc=1; exit $$rc
19test-doctor: $(DOCTOR)
20 sh tests/doctor/run.sh $(DOCTOR)