Skip to content

Commit

Permalink
#14406: Initial commit to test ccl perf in pipeline
Browse files Browse the repository at this point in the history
#14406: Initial commit to test ccl perf in pipeline--amend
  • Loading branch information
Aswinmcw committed Nov 7, 2024
1 parent 62255a8 commit 50d0e27
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/t3000-model-perf-tests-impl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
{ name: "t3k LLM llama3 model perf tests", model: "llama3", model-type: "LLM", arch: wormhole_b0, cmd: run_t3000_llama3_tests, timeout: 60, owner_id: U03PUAKE719}, # Miguel Tairum
{ name: "t3k LLM falcon40b model perf tests", model: "falcon40b", model-type: "LLM", arch: wormhole_b0, cmd: run_t3000_falcon40b_tests, timeout: 75, owner_id: U053W15B6JF}, # Djordje Ivanovic
{ name: "t3k CNN resnet50 model perf tests", model: "resnet50", model-type: "CNN", arch: wormhole_b0, cmd: run_t3000_resnet50_tests, timeout: 75, owner_id: U013121KDH9}, # Austin Ho
{ name: "t3k CCL model perf tests", arch: wormhole_b0, cmd: run_t3000_ccl_perf_tests, timeout: 75, owner_id: ULMEPM2MA}, # Sean Nijjar
#{ name: "t3k CNN model perf tests ", model-type: "CNN", arch: wormhole_b0, cmd: run_t3000_cnn_tests, timeout: 120, owner_id: }, #No tests are being run?
]
name: ${{ matrix.test-group.name }}
Expand Down
29 changes: 28 additions & 1 deletion tests/scripts/t3000/run_t3000_model_perf_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,25 @@ run_t3000_resnet50_tests() {
fi
}

run_t3000_ccl_perf_tests() {
# Record the start time
fail=0
start_time=$(date +%s)

echo "LOG_METAL: Running run_t3000_ccl_perf_tests"

tests/ttnn/unit_tests/operations/ccl/perf/run_profile.sh -t t3000
fail+=$?

# Record the end time
end_time=$(date +%s)
duration=$((end_time - start_time))
echo "LOG_METAL: run_t3000_ccl_perf_tests $duration seconds to complete"
if [[ $fail -ne 0 ]]; then
exit 1
fi
}

run_t3000_llm_tests() {
# Run falcon7b tests
run_t3000_falcon7b_tests
Expand Down Expand Up @@ -173,6 +192,12 @@ run_t3000_cnn_tests() {
env python models/perf/merge_perf_results.py
}

run_t3000_ccl_tests() {
# Run ccl performance tests
run_t3000_ccl_perf_tests

}

fail=0
main() {
# For CI pipeline - source func commands but don't execute tests if not invoked directly
Expand Down Expand Up @@ -219,8 +244,10 @@ main() {
run_t3000_llm_tests
elif [[ "$pipeline_type" == "cnn_model_perf_t3000_device" ]]; then
run_t3000_cnn_tests
elif [[ "$pipeline_type" == "ccl_perf_t3000_device" ]]; then
run_t3000_ccl_tests
else
echo "$pipeline_type is invalid (supported: [cnn_model_perf_t3000_device, cnn_model_perf_t3000_device])" 2>&1
echo "$pipeline_type is invalid (supported: [cnn_model_perf_t3000_device, cnn_model_perf_t3000_device, ccl_perf_t3000_device])" 2>&1
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion tests/ttnn/unit_tests/operations/ccl/perf/perf_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def perf_report(file_path):

df = df.dropna(subset=["DEVICE ERISC KERNEL DURATION [ns]"])
df = df[df["OP TO OP LATENCY [ns]"] != 0]
df = df[df["TRACE ID"].notna() & (df["TRACE ID"] != "")]
df = df[df["METAL TRACE ID"].notna() & (df["METAL TRACE ID"] != "")]

def remove_keys_from_attributes(attributes):
attributes = attributes.replace(";", ",").replace("'", '"')
Expand Down

0 comments on commit 50d0e27

Please sign in to comment.