Skip to content

Commit 819dddb

Browse files
committed
Review: formatting changes + change github action
1 parent 0f644e9 commit 819dddb

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

.github/workflows/update-ops-docs.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,18 @@ jobs:
2323
with:
2424
python-version: '3.x'
2525

26-
- name: Generate operations documentation
27-
run: ./scripts/create_ops_docs.py
28-
29-
- name: Check if docs/ops.md was updated
30-
id: check_changes
26+
- name: Generate operations documentation to temporary file
3127
run: |
32-
if git diff --quiet docs/ops.md; then
33-
echo "changed=false" >> $GITHUB_OUTPUT
34-
else
35-
echo "changed=true" >> $GITHUB_OUTPUT
36-
fi
28+
mkdir -p /tmp/ops_check
29+
./scripts/create_ops_docs.py > /tmp/ops_check/ops.md
3730
38-
- name: Commit updated documentation
39-
if: steps.check_changes.outputs.changed == 'true' && github.event_name == 'push'
31+
- name: Check if docs/ops.md matches generated version
4032
run: |
41-
git config --local user.email "[email protected]"
42-
git config --local user.name "GitHub Action"
43-
git add docs/ops.md
44-
git commit -m "Update operations documentation from CSV files"
45-
git push
33+
if ! diff -q docs/ops.md /tmp/ops_check/ops.md; then
34+
echo "Operations documentation (docs/ops.md) is not up to date with the backend CSV files."
35+
echo "To fix: run ./scripts/create_ops_docs.py and commit the updated docs/ops.md along with your changes"
36+
echo "Differences found:"
37+
diff docs/ops.md /tmp/ops_check/ops.md || true
38+
exit 1
39+
fi
40+
echo "Operations documentation is up to date."

docs/ops/ryzen3800.csv renamed to docs/ops/CPU.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Test comment to trigger workflow
12
"test_time","build_commit","backend_name","op_name","op_params","test_mode","supported","passed","error_message","time_us","flops","bandwidth_gb_s","memory_kb","n_runs","device_description","backend_reg_name"
23
"2025-07-09T15:15:35Z","26a48ad6","CPU","ABS","type=f16,ne_a=[128,2,2,2],v=0","support","1","1","yes","0.000000","0.000000","0.000000","0","0","AMD Ryzen 7 3800XT 8-Core Processor","CPU"
34
"2025-07-09T15:15:35Z","26a48ad6","CPU","ABS","type=f16,ne_a=[5,7,11,13],v=0","support","1","1","yes","0.000000","0.000000","0.000000","0","0","AMD Ryzen 7 3800XT 8-Core Processor","CPU"
File renamed without changes.

tests/test-backend-ops.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -819,9 +819,9 @@ struct console_printer : public printer {
819819
fflush(stdout);
820820

821821
if (result.supported) {
822-
printf("\033[1;32myes\033[0m\n");
822+
printf("\033[1;32mSUPPORTED\033[0m\n");
823823
} else {
824-
printf("\033[1;31mno\033[0m\n");
824+
printf("\033[1;31mNOT SUPPORTED\033[0m\n");
825825
}
826826
}
827827
};
@@ -1342,9 +1342,7 @@ struct test_case {
13421342
test_result result(ggml_backend_name(backend), current_op_name, vars(), "support", supported, supported,
13431343
supported ? "yes" : "no", 0.0, 0.0, 0.0, 0, 0, device_desc, backend_reg_name);
13441344

1345-
if (output_printer) {
1346-
output_printer->print_test_result(result);
1347-
}
1345+
output_printer->print_test_result(result);
13481346

13491347
return true;
13501348
}
@@ -5691,7 +5689,7 @@ static bool test_backend(ggml_backend_t backend, test_mode mode, const char * op
56915689
}
56925690

56935691
static void usage(char ** argv) {
5694-
printf("Usage: %s [mode] [-o <op>] [-b <backend>] [-p <params regex>] [--output <console|sql>]\n", argv[0]);
5692+
printf("Usage: %s [mode] [-o <op>] [-b <backend>] [-p <params regex>] [--output <console|sql|csv>]\n", argv[0]);
56955693
printf(" valid modes:\n");
56965694
printf(" - test (default, compare with CPU backend for correctness)\n");
56975695
printf(" - grad (compare gradients from backpropagation with method of finite differences)\n");

0 commit comments

Comments
 (0)