|
| 1 | +# H100 Benchmark Suite Makefile (following cutlass-bench pattern) |
| 2 | +.PHONY: all simple graph newton vpi clean |
| 3 | + |
| 4 | +# Default: Build all apps (submodules initialized by parent Makefile) |
| 5 | +all: simple graph newton vpi |
| 6 | + |
| 7 | +# Simple apps (cuFFT, cuSolver, image processing - CUDA toolkit only) |
| 8 | +simple: cufft cusolver image |
| 9 | + |
| 10 | +cufft: |
| 11 | + $(MAKE) -C cufft/cufft_3d_c2c |
| 12 | + $(MAKE) -C cufft/cufft_lto_r2c_c2r |
| 13 | + |
| 14 | +cusolver: |
| 15 | + $(MAKE) -C cusolver/cusolver_ormqr |
| 16 | + $(MAKE) -C cusolver/cusolver_Xgetrf |
| 17 | + |
| 18 | +image: |
| 19 | + $(MAKE) -C image/dwtHaar1D |
| 20 | + $(MAKE) -C image/recursiveGaussian |
| 21 | + $(MAKE) -C image/FDTD3d |
| 22 | + |
| 23 | +# Graph apps (cuGraph submodule - built with CMake) |
| 24 | +graph: |
| 25 | + @echo "Building cuGraph library from submodule..." |
| 26 | + @if [ -d "external/cugraph" ]; then \ |
| 27 | + cd external/cugraph && \ |
| 28 | + ./build.sh libcugraph --skip_cpp_tests -n && \ |
| 29 | + echo "Building graph apps..." && \ |
| 30 | + cd ../.. && \ |
| 31 | + export CUGRAPH_ROOT="$(shell pwd)/external/cugraph" && \ |
| 32 | + mkdir -p graph/bfs_standalone/build && \ |
| 33 | + cd graph/bfs_standalone/build && \ |
| 34 | + cmake .. -DCMAKE_CUDA_COMPILER=$(CUDA_INSTALL_PATH)/bin/nvcc && \ |
| 35 | + $(MAKE) && \ |
| 36 | + cd ../../.. && \ |
| 37 | + mkdir -p graph/mst_standalone/build && \ |
| 38 | + cd graph/mst_standalone/build && \ |
| 39 | + cmake .. -DCMAKE_CUDA_COMPILER=$(CUDA_INSTALL_PATH)/bin/nvcc && \ |
| 40 | + $(MAKE); \ |
| 41 | + else \ |
| 42 | + echo "WARNING: cuGraph submodule not found - skipping graph apps"; \ |
| 43 | + fi |
| 44 | + |
| 45 | +# Newton apps (Newton submodule - Python-based) |
| 46 | +newton: |
| 47 | + @echo "Setting up Newton apps..." |
| 48 | + chmod +x newton/setup_newton.sh newton/newton_diffsim_ball newton/newton_robot_cartpole newton/newton_mpm_granular |
| 49 | + @echo "Newton wrapper scripts ready. Virtual environment will be created on first run." |
| 50 | + |
| 51 | +# VPI apps (VPI library from system - optional) |
| 52 | +# NOTE: VPI requires system installation. Run setup_vpi.sh with sudo if VPI is not installed. |
| 53 | +vpi: |
| 54 | + @if command -v vpi-config &> /dev/null; then \ |
| 55 | + echo "Building VPI apps..."; \ |
| 56 | + mkdir -p vpi/vpi_background_subtractor/build && \ |
| 57 | + cd vpi/vpi_background_subtractor/build && \ |
| 58 | + cmake .. && $(MAKE) && \ |
| 59 | + cd ../../.. && \ |
| 60 | + mkdir -p vpi/vpi_orb_feature_detector/build && \ |
| 61 | + cd vpi/vpi_orb_feature_detector/build && \ |
| 62 | + cmake .. && $(MAKE) && \ |
| 63 | + cd ../../.. && \ |
| 64 | + mkdir -p vpi/vpi_stereo_disparity/build && \ |
| 65 | + cd vpi/vpi_stereo_disparity/build && \ |
| 66 | + cmake .. && $(MAKE); \ |
| 67 | + else \ |
| 68 | + echo "WARNING: VPI not installed - skipping VPI apps"; \ |
| 69 | + echo " To install VPI, run: sudo bash setup_vpi.sh"; \ |
| 70 | + fi |
| 71 | + |
| 72 | +clean: |
| 73 | + # Clean simple apps |
| 74 | + -$(MAKE) -C cufft/cufft_3d_c2c clean |
| 75 | + -$(MAKE) -C cufft/cufft_lto_r2c_c2r clean |
| 76 | + -$(MAKE) -C cusolver/cusolver_ormqr clean |
| 77 | + -$(MAKE) -C cusolver/cusolver_Xgetrf clean |
| 78 | + -$(MAKE) -C image/dwtHaar1D clean |
| 79 | + -$(MAKE) -C image/recursiveGaussian clean |
| 80 | + -$(MAKE) -C image/FDTD3d clean |
| 81 | + # Clean graph apps and cuGraph build |
| 82 | + -rm -rf graph/bfs_standalone/build |
| 83 | + -rm -rf graph/mst_standalone/build |
| 84 | + -rm -rf external/cugraph/cpp/build |
| 85 | + # Clean Newton |
| 86 | + -rm -rf newton/newton_venv |
| 87 | + # Clean VPI apps |
| 88 | + -rm -rf vpi/*/build |
0 commit comments