Skip to content

Commit 915fd8d

Browse files
committed
H100 new apps
1 parent 80f1acd commit 915fd8d

87 files changed

Lines changed: 18093 additions & 14 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@
1111
path = src/cuda/pytorch_examples
1212
url = https://github.com/accel-sim/pytorch_examples.git
1313
branch = inference_accelsim_v2
14+
[submodule "src/cuda/H100/external/cugraph"]
15+
path = src/cuda/H100/external/cugraph
16+
url = https://github.com/rapidsai/cugraph.git
17+
[submodule "src/cuda/H100/external/newton"]
18+
path = src/cuda/H100/external/newton
19+
url = https://github.com/newton-physics/newton.git

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,16 @@ To compile everything above for AccelWattch:
6868
```
6969
make accelwattch -C ./src
7070
```
71+
72+
## H100 Benchmark Suite
73+
74+
The H100 suite contains 15 modern GPU workloads from H100 profiling and analysis:
75+
76+
- **cuFFT** (2 apps): FFT operations using cuFFT library
77+
- **cuSolver** (2 apps): Linear algebra using cuSolver library
78+
- **Image Processing** (3 apps): Wavelet transform, Gaussian filter, FDTD3d
79+
- **Graph Algorithms** (2 apps): BFS and MST using cuGraph (git submodule)
80+
- **Physics Simulation** (3 apps): Newton physics engine benchmarks (git submodule)
81+
- **Computer Vision** (3 apps): VPI-based vision processing (optional, requires VPI 4.0)
82+
83+
See [src/cuda/H100/README.md](src/cuda/H100/README.md) for details.

get_data.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,15 @@ if [ ! -d $DATA_ROOT ]; then
1010
tar xzvf all.gpgpu-sim-app-data.tgz -C $BASH_ROOT
1111
rm all.gpgpu-sim-app-data.tgz
1212
fi
13+
14+
# Generate H100 benchmark data
15+
echo "Generating H100 benchmark data..."
16+
if [ -f $BASH_ROOT/src/cuda/H100/get_graph_data.sh ]; then
17+
bash $BASH_ROOT/src/cuda/H100/get_graph_data.sh || echo "Warning: Graph data generation failed"
18+
fi
19+
if [ -f $BASH_ROOT/src/cuda/H100/get_image_data.sh ]; then
20+
bash $BASH_ROOT/src/cuda/H100/get_image_data.sh || echo "Warning: Image data generation failed"
21+
fi
22+
if [ -f $BASH_ROOT/src/cuda/H100/get_dwt_data.sh ]; then
23+
bash $BASH_ROOT/src/cuda/H100/get_dwt_data.sh || echo "Warning: DWT data generation failed"
24+
fi

src/Makefile

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $(error You must run "source setup_environment before calling make")
44
endif
55

66
ifeq ($(CUDA_GT_7), 1)
7-
all: GPU_Microbenchmark microbench rodinia_2.0-ft cutlass rodinia-3.1 pannotia proxy-apps ispass-2009 lonestargpu-2.0 polybench custom_apps heterosync cuda_samples mlperf_inference vllm huggingface # mlperf_training
7+
all: GPU_Microbenchmark microbench rodinia_2.0-ft cutlass rodinia-3.1 pannotia proxy-apps ispass-2009 lonestargpu-2.0 polybench custom_apps heterosync cuda_samples mlperf_inference vllm huggingface H100 # mlperf_training
88
else
99
ifeq ($(CUDA_GT_4), 1)
1010
all: pannotia rodinia_2.0-ft proxy-apps dragon-naive microbench rodinia-3.1 ispass-2009 dragon-cdp lonestargpu-2.0 polybench parboil shoc custom_apps
@@ -19,7 +19,7 @@ accelwattch_hw_power: rodinia-3.1_hw_power parboil_hw_power cuda_samples-11.0_hw
1919
#Disable clean for now, It has a bug!
2020
# clean_dragon-naive clean_pannotia clean_proxy-apps
2121

22-
clean: clean_mlperf_inference clean_rodinia_2.0-ft clean_dragon-cdp clean_ispass-2009 clean_lonestargpu-2.0 clean_custom_apps clean_parboil clean_cutlass clean_rodinia-3.1 clean_heterosync clean_UVMSmart_test clean_cuda_samples clean_huggingface clean_GPU_Microbenchmark
22+
clean: clean_mlperf_inference clean_rodinia_2.0-ft clean_dragon-cdp clean_ispass-2009 clean_lonestargpu-2.0 clean_custom_apps clean_parboil clean_cutlass clean_rodinia-3.1 clean_heterosync clean_UVMSmart_test clean_cuda_samples clean_huggingface clean_GPU_Microbenchmark clean_H100
2323
clean_accelwattch: clean_rodinia-3.1 clean_parboil clean_cutlass clean_cuda_samples-11.0 clean_cuda_samples_hw_power clean_rodinia-3.1_hw_power clean_parboil_hw_power clean_accelwattch_ubench
2424

2525
clean_data:
@@ -543,6 +543,41 @@ clean_heterosync:
543543
clean_cutlass:
544544
rm -rf cuda/cutlass-bench/build
545545

546+
###############################################################################
547+
# H100 Benchmarks - Modern GPU workloads (CUDA 11+, sm_75+)
548+
###############################################################################
549+
H100:
550+
mkdir -p $(BINDIR)/$(BINSUBDIR)/
551+
# Initialize and update submodules (like cutlass pattern)
552+
git submodule init && git submodule update
553+
# Build simple apps (cuFFT, cuSolver, image processing)
554+
$(SETENV) $(MAKE) $(MAKE_ARGS) -C cuda/H100 simple
555+
mv cuda/H100/cufft/cufft_3d_c2c/cufft_3d_c2c_scalable $(BINDIR)/$(BINSUBDIR)/H100-cufft_3d_c2c
556+
mv cuda/H100/cufft/cufft_lto_r2c_c2r/cufft_lto_r2c_c2r_scalable $(BINDIR)/$(BINSUBDIR)/H100-cufft_lto_r2c_c2r
557+
mv cuda/H100/cusolver/cusolver_ormqr/cusolver_ormqr_scalable $(BINDIR)/$(BINSUBDIR)/H100-cusolver_ormqr
558+
mv cuda/H100/cusolver/cusolver_Xgetrf/cusolver_Xgetrf_scalable $(BINDIR)/$(BINSUBDIR)/H100-cusolver_Xgetrf
559+
mv cuda/H100/image/dwtHaar1D/dwtHaar1D $(BINDIR)/$(BINSUBDIR)/H100-dwtHaar1D
560+
mv cuda/H100/image/FDTD3d/FDTD3d $(BINDIR)/$(BINSUBDIR)/H100-FDTD3d
561+
# Build graph apps (cuGraph submodule)
562+
-$(SETENV) $(MAKE) $(MAKE_ARGS) -C cuda/H100 graph && \
563+
cp cuda/H100/graph/bfs_standalone/build/bfs_standalone $(BINDIR)/$(BINSUBDIR)/H100-bfs && \
564+
cp cuda/H100/graph/mst_standalone/build/mst_standalone $(BINDIR)/$(BINSUBDIR)/H100-mst
565+
# Build Newton apps (Newton submodule)
566+
cp -r cuda/H100/newton $(BINDIR)/$(BINSUBDIR)/
567+
bash $(BINDIR)/$(BINSUBDIR)/newton/setup_newton.sh
568+
chmod u+x $(BINDIR)/$(BINSUBDIR)/newton/newton_*
569+
# Build VPI apps (if VPI installed)
570+
@if [ -n "$(VPI_INSTALL_PATH)" ]; then \
571+
$(SETENV) $(MAKE) $(MAKE_ARGS) -C cuda/H100 vpi && \
572+
find cuda/H100/vpi/*/build -name "vpi_*" -type f -executable -exec cp {} $(BINDIR)/$(BINSUBDIR)/ \;; \
573+
fi
574+
575+
clean_H100:
576+
$(SETENV) $(MAKE) -C cuda/H100 clean
577+
rm -rf cuda/H100/external/cugraph/build
578+
rm -rf cuda/H100/external/newton/build
579+
rm -rf cuda/H100/newton/newton_venv
580+
546581
# clean_deeplearning:
547582
# $(SETENV) $(MAKE) $(MAKE_ARGS) noinline=$(noinline) -C cuda/cudnn/mnist clean
548583

src/cuda/GPU_Microbenchmark/hw_def/common/gpuConfig.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ inline void parseGpuConfigArgs(int argc, char *argv[])
108108
++i;
109109
}
110110
config.MAX_WARPS_PER_SM = config.MAX_THREADS_PER_SM / config.WARP_SIZE;
111-
config.MEM_CLK_FREQUENCY = config.MEM_CLK_FREQUENCY * 1e-3f;
111+
// Note: MEM_CLK_FREQUENCY is already in MHz from initializeDeviceProp (line 313)
112+
// Do not convert to GHz - the bandwidth calculation expects MHz
113+
// config.MEM_CLK_FREQUENCY = config.MEM_CLK_FREQUENCY * 1e-3f;
112114
config.BLOCKS_PER_SM = config.MAX_THREADS_PER_SM / config.THREADS_PER_BLOCK;
113115
config.THREADS_PER_SM = config.BLOCKS_PER_SM * config.THREADS_PER_BLOCK;
114116
config.TOTAL_THREADS = config.THREADS_PER_BLOCK * config.BLOCKS_NUM;

src/cuda/GPU_Microbenchmark/ubench/mem/mem_bw/mem_bw.cu

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,32 @@ int main(int argc, char *argv[])
145145
float milliseconds = 0;
146146
cudaEventElapsedTime(&milliseconds, start, stop);
147147

148-
unsigned N = ARRAY_SIZE * 6 * sizeof(float); // 6 arrays of floats types
149-
float max_bw = (float)config.MEM_BITWIDTH * config.MEM_CLK_FREQUENCY * 2 / 1e3 / 8;
150-
mem_bw = (float)(N) / ((float)(stopClk[0] - startClk[0]));
151-
printf("Mem BW= %f (Byte/Clk)\n", mem_bw);
152-
printf("Mem BW= %f (GB/sec)\n", (float)N / milliseconds / 1e6);
153-
printf("Max Theortical Mem BW= %f (GB/sec)\n", max_bw);
154-
printf("Mem Efficiency = %f %%\n", (mem_bw / max_bw) * 100);
155-
156-
printf("Total Clk number = %u \n", stopClk[0] - startClk[0]);
148+
// Find min and max clocks across all threads to get actual kernel execution time
149+
uint32_t minStart = startClk[0], maxStop = stopClk[0];
150+
for (unsigned i = 1; i < config.TOTAL_THREADS; i++) {
151+
if (startClk[i] < minStart) minStart = startClk[i];
152+
if (stopClk[i] > maxStop) maxStop = stopClk[i];
153+
}
154+
uint32_t totalClocks = maxStop - minStart;
155+
156+
unsigned N = ARRAY_SIZE * 6 * sizeof(float); // 6 arrays of floats (5 reads + 1 write)
157+
158+
// Theoretical max bandwidth in GB/s
159+
// MEM_CLK_FREQUENCY is in MHz, MEM_BITWIDTH is in bits
160+
// BW = (Bus Width / 8 bytes) × (Clock MHz) × 2 (DDR) / 1000 = GB/s
161+
float max_bw = (float)config.MEM_BITWIDTH / 8 * config.MEM_CLK_FREQUENCY * 2 / 1000;
162+
163+
// Achieved bandwidth from CUDA event timing (most accurate)
164+
float achieved_bw_from_time = (float)N / milliseconds / 1e6;
165+
166+
// Achieved bandwidth from cycle count (less accurate, single SM perspective)
167+
float achieved_bw_from_cycles = ((float)N / totalClocks) * config.CLK_FREQUENCY / 1e3;
168+
169+
printf("Mem BW= %f (Byte/Clk)\n", (float)N / totalClocks);
170+
printf("Mem BW (from time)= %f (GB/sec)\n", achieved_bw_from_time);
171+
printf("Mem BW (from cycles)= %f (GB/sec)\n", achieved_bw_from_cycles);
172+
printf("Max Theoretical Mem BW= %f (GB/sec)\n", max_bw);
173+
printf("Mem Efficiency = %f %%\n", (achieved_bw_from_time / max_bw) * 100);
174+
175+
printf("Total Clk number = %u (min start: %u, max stop: %u)\n", totalClocks, minStart, maxStop);
157176
}

src/cuda/H100/Makefile

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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

src/cuda/H100/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# H100 Benchmark Suite
2+
3+
14 modern GPU workloads from H100 profiling and analysis.
4+
5+
## Applications
6+
7+
### cuFFT (2 apps) - FFT operations
8+
- `cufft_3d_c2c_scalable` - 3D Complex-to-Complex FFT
9+
- `cufft_lto_r2c_c2r_scalable` - Real↔Complex FFT with LTO callbacks
10+
11+
### cuSolver (2 apps) - Linear algebra
12+
- `cusolver_ormqr_scalable` - QR factorization
13+
- `cusolver_Xgetrf_scalable` - LU factorization
14+
15+
### Image Processing (3 apps)
16+
- `dwtHaar1D` - Haar wavelet transform
17+
- `recursiveGaussian` - Recursive Gaussian filter
18+
- `FDTD3d` - Finite-Difference Time-Domain 3D simulation
19+
20+
### Graph Algorithms (2 apps)
21+
- `bfs_standalone` - Breadth-First Search (requires cuGraph submodule)
22+
- `mst_standalone` - Minimum Spanning Tree (requires cuGraph submodule)
23+
24+
### Physics Simulation (3 apps)
25+
- `newton_diffsim_ball` - Differential simulation (requires Newton submodule)
26+
- `newton_robot_cartpole` - Robotics simulation (requires Newton submodule)
27+
- `newton_mpm_granular` - Material Point Method simulation (requires Newton submodule)
28+
29+
### Computer Vision (3 apps)
30+
- `vpi_background_subtractor` - Background subtraction (requires VPI 4.0)
31+
- `vpi_orb_feature_detector` - ORB feature detection (requires VPI 4.0)
32+
- `vpi_stereo_disparity` - Stereo disparity calculation (requires VPI 4.0)
33+
34+
## Dependencies
35+
36+
- **CUDA 11.0+** - Required (provides cuFFT, cuSolver, cuBLAS libraries)
37+
- **cuGraph** - Git submodule (auto-initialized for graph apps)
38+
- **Newton** - Git submodule (auto-initialized for physics apps)
39+
- **VPI 4.0** - install from https://developer.nvidia.com/embedded/vpi
40+
41+
## Build
42+
43+
```bash
44+
# From repository root
45+
source src/setup_environment
46+
47+
# Generate data files (standard workflow)
48+
make data
49+
50+
# Build all H100 apps
51+
make -C src H100
52+
53+
# Or build everything with:
54+
make all -i -j -C src
55+
```
56+
57+
Binaries are output to `bin/<cuda-version>/release/H100-*`
58+
59+
Newton apps are copied to `bin/<cuda-version>/release/newton/newton_*`
60+
61+
## Running
62+
63+
```bash
64+
# cuFFT apps
65+
bin/*/release/H100-cufft_3d_c2c small
66+
bin/*/release/H100-cufft_lto_r2c_c2r medium
67+
68+
# cuSolver apps
69+
bin/*/release/H100-cusolver_ormqr large
70+
bin/*/release/H100-cusolver_Xgetrf medium
71+
72+
# Image apps
73+
bin/*/release/H100-dwtHaar1D
74+
bin/*/release/H100-recursiveGaussian
75+
bin/*/release/H100-FDTD3d
76+
77+
# Graph apps (with generated data)
78+
bin/*/release/H100-bfs data_dirs/cuda/H100/graph/karate.mtx
79+
bin/*/release/H100-mst data_dirs/cuda/H100/graph/netscience.mtx
80+
81+
# Newton apps
82+
bin/*/release/newton/newton_diffsim_ball
83+
bin/*/release/newton/newton_robot_cartpole
84+
bin/*/release/newton/newton_mpm_granular
85+
86+
# VPI apps (if VPI installed)
87+
bin/*/release/vpi_background_subtractor cuda <video-file> <frames>
88+
```
89+
90+
## GPU Support
91+
92+
- Requires compute capability 7.5+ (Turing, Ampere, Hopper)
93+
- Tested on: V100 (sm_70), A100 (sm_80), H100 (sm_90)
94+
95+
## Notes
96+
97+
- Simple apps (cuFFT, cuSolver, image) build on any system with CUDA 11+
98+
- Graph apps require cuGraph submodule (automatically handled by build system)
99+
- Newton apps create Python virtual environment on first run
100+
- VPI apps are optional and only build if VPI library is installed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
EXECUTABLE := cufft_3d_c2c_scalable
2+
CUFILES := cufft_3d_c2c_scalable.cu
3+
CCFILES :=
4+
ADDITIONAL_LIBS := -lcufft
5+
OMIT_CUTIL_LIB := 1
6+
OMIT_SHRUTIL_LIB := 1
7+
SM_VERSIONS := 75 80 90
8+
9+
include ../../../common/common.mk

0 commit comments

Comments
 (0)