Skip to content

Commit 8803f87

Browse files
committed
Concat after chunks moving to ensure usability
1 parent 3a8d714 commit 8803f87

7 files changed

Lines changed: 306 additions & 54 deletions

Ironwood/configs/host_device/host_device_single_chip.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ benchmarks:
33
num_runs: 20
44
benchmark_sweep_params:
55
# Single Chip (1 Chip, 2 Devices)
6-
- {mesh_shape: "1x2", data_size_mb_list: [1, 16, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]}
6+
- {
7+
num_devices: 2,
8+
smart_chunking: False,
9+
data_size_mb_list: [1, 16, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]
10+
}
711

812
csv_path: "../microbenchmarks/host_device/single_chip"
913
trace_dir: "../microbenchmarks/host_device/single_chip/trace"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
benchmarks:
2+
- benchmark_name: host_device
3+
num_runs: 20
4+
benchmark_sweep_params:
5+
# Single Chip (1 Chip, 2 Devices)
6+
# Data sizes: 1MB to 32GB (powers of 2)
7+
- {
8+
num_devices: 2,
9+
smart_chunking: True,
10+
data_size_mb_list: [1, 16, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]
11+
}
12+
13+
csv_path: "../microbenchmarks/host_device/single_chip_smart_chunking"
14+
trace_dir: "../microbenchmarks/host_device/single_chip_smart_chunking/trace"

Ironwood/guides/host_device/host_device.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,16 @@ To retrieve the complete results, including the trace and CSV output files, you
2828
```bash
2929
kubectl cp tpu7x-host-device-benchmark:/microbenchmarks/host_device host_device
3030
```
31+
32+
## Run Smart Chunking Mode (Optional)
33+
34+
To run the benchmark with "Smart Chunking" enabled (searching for optimal transfer chunk size):
35+
36+
```bash
37+
kubectl apply -f tpu7x-host-device-benchmark-smart-chunking.yaml
38+
```
39+
40+
View logs:
41+
```bash
42+
kubectl logs tpu7x-host-device-benchmark-smart-chunking
43+
```
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: tpu7x-host-device-benchmark-smart-chunking
5+
spec:
6+
restartPolicy: Never
7+
nodeSelector:
8+
cloud.google.com/gke-tpu-accelerator: tpu7x
9+
cloud.google.com/gke-tpu-topology: 2x2x1
10+
containers:
11+
- name: tpu-job
12+
image: python:3.12
13+
ports:
14+
- containerPort: 8431
15+
securityContext:
16+
privileged: false
17+
command:
18+
- bash
19+
- -c
20+
- |
21+
set -ex
22+
23+
git clone https://github.com/AI-Hypercomputer/accelerator-microbenchmarks.git
24+
cd accelerator-microbenchmarks
25+
pip install -r requirements.txt
26+
27+
# Run ONLY the smart chunking config
28+
bash ./Ironwood/scripts/run_host_device_benchmark.sh --config Ironwood/configs/host_device/host_device_single_chip_smart_chunking.yaml
29+
30+
resources:
31+
requests:
32+
google.com/tpu: 4
33+
limits:
34+
google.com/tpu: 4

Ironwood/guides/host_device/tpu7x-host-device-benchmark.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
cd accelerator-microbenchmarks
2525
pip install -r requirements.txt
2626
27-
bash ./Ironwood/scripts/run_host_device_benchmark.sh
27+
bash ./Ironwood/scripts/run_host_device_benchmark.sh --config Ironwood/configs/host_device/host_device_single_chip.yaml
2828
2929
resources:
3030
requests:

Ironwood/scripts/run_host_device_benchmark.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ while [[ "$#" -gt 0 ]]; do
2727
done
2828

2929
echo "--- Starting Host-Device Transfer Benchmark (H2D/D2H) ---"
30-
echo "Note: This benchmark is work in progress"
30+
echo "*****************************************************"
31+
echo "* WARNING: THIS BENCHMARK IS A WORK IN PROGRESS *"
32+
echo "* Results may be unstable or subject to change. *"
33+
echo "*****************************************************"
3134
echo "Interleaved: $INTERLEAVED"
3235

3336
if [ -n "$SPECIFIC_CONFIG" ]; then

0 commit comments

Comments
 (0)