Skip to content

Commit af9f592

Browse files
Update benchmarks.yml
1 parent b5d1db2 commit af9f592

File tree

1 file changed

+43
-3
lines changed

1 file changed

+43
-3
lines changed

.github/workflows/benchmarks.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,52 @@ jobs:
2828
steps:
2929
- name: Checkout XLA
3030
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
31+
with:
32+
path: "openxla/xla"
33+
34+
- name: Print machine specs
35+
run: |
36+
nvidia-smi
37+
free -h # Memory information
38+
df -h # Disk space information
39+
uname -a # Kernel information
3140
3241
- name: Create results directory
42+
run: mkdir results
43+
44+
- name: Configure XLA for GPU backend
45+
run: |
46+
./configure.py --backend CUDA --nccl
47+
48+
- name: Set TF_CPP_MAX_VLOG_LEVEL
49+
env:
50+
TF_CPP_MAX_VLOG_LEVEL: 1
51+
run: |
52+
echo "TF_CPP_MAX_VLOG_LEVEL is: $TF_CPP_MAX_VLOG_LEVEL"
53+
54+
- name: Build hlo_runner_main
55+
run: bazel build -c opt --config=cuda --dynamic_mode=off //xla/tools/multihost_hlo_runner:hlo_runner_main
56+
# TODO(juliagmt): Add more performance-criticalHLOs to benchmark.
57+
- name: Run xla/tools/hlo_opt/tests/gpu_hlo_pass.hlo
3358
run: |
34-
mkdir results
35-
ls
36-
cd results
59+
./bazel-bin/xla/tools/multihost_hlo_runner/hlo_runner_main --device_type=gpu --log_output=True --use_spmd_partitioning --xla_gpu_dump_xspace_to=xla/results/xspace.pbtxt xla/tools/hlo_opt/tests/gpu_hlo_pass.hlo
60+
61+
- name: Compute the cost of gpu_hlo_pass.hlo
62+
run: |
63+
PWD=$(pwd)
64+
bazel run //xla/tools:compute_cost -- --input=$PWD/xla/tools/hlo_opt/tests/gpu_hlo_pass.hlo --format=hlo --gpu
65+
66+
- name: Checkout juliagmt-google/xla
67+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Replace with the current SHA of v4.1.1 or later
68+
with:
69+
repository: juliagmt-google/xla
70+
path: juliagmt-google-xla
71+
72+
- name: Run get_device_stats_main
73+
run: |
74+
bazel run //xla/tools:get_device_stats_main -- --input=$PWD/xla/results/xspace.pb
75+
working-directory: juliagmt-google-xla
76+
3777
- name: Upload Artifacts
3878
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
3979
with:

0 commit comments

Comments
 (0)