-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmicrobench.sh
More file actions
32 lines (30 loc) · 941 Bytes
/
microbench.sh
File metadata and controls
32 lines (30 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
PROFILERS=("none" "nsys" "proton")
WORKLOADS=("cpu_bound" "gpu_bound")
KERNELS=("torch" "triton")
for profiler in "${PROFILERS[@]}"
do
for workload in "${WORKLOADS[@]}"
do
for kernel in "${KERNELS[@]}"
do
if [ "$profiler" == "nsys" ];
then
cmd="time nsys profile python microbench.py --workload $workload --profiler $profiler --kernel $kernel"
elif [ "$profiler" == "proton" ];
then
if [ "$kernel" == "triton" ]
then
cmd="time proton -k triton microbench.py --workload $workload --profiler $profiler --kernel $kernel"
else
cmd="time proton microbench.py --workload $workload --profiler $profiler --kernel $kernel"
fi
elif [ "$profiler" == "none" ];
then
cmd="time python microbench.py --workload $workload --profiler $profiler --kernel $kernel"
fi
echo "$cmd"
eval "$cmd"
done
done
done