Skip to content

Commit cc004be

Browse files
Merge branch 'fork_main' into maxim_artemov/TTNN-24217-torch-conversion-via-typecast-v3
2 parents 9a849d1 + 927a540 commit cc004be

File tree

395 files changed

+16263
-5382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+16263
-5382
lines changed

.clang-tidy

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#
1616
# === Evaluated ===
1717
#
18-
# bugprone-branch-clone:
19-
# Attempted, no fixit, lots of violations.
20-
#
2118
# bugprone-unchecked-optional-access:
2219
# Attempted, no fixit, lots of violations. Extensive usage of std::optional in this codebase.
2320
#

.clang-tidy-light

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
bugprone-exception-escape
12
cppcoreguidelines-pro-type-cstyle-cast
23
cppcoreguidelines-special-member-functions
34
readability-math-missing-parentheses

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,3 +410,4 @@ tt-train/tests/** @mdragulaTT @vmelnykovTT @dyurshevichTT @zbaczewskiTT @athomps
410410

411411
# Tech reports
412412
tech_reports/LLMs/vLLM_integration.md @skhorasganiTT @viktorpusTT @tenstorrent/codeowner-bypass
413+
models/experimental/yunet @tvardhineniTT @dvartaniansTT @tenstorrent/cse-developer-ttnn @tenstorrent/codeowner-bypass

.github/workflows/code-analysis.yaml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: "Code analysis"
22

33
on:
44
schedule:
5-
- cron: "0 2 * * 2,4,6" # Static analysis: 6 PM PST Mon/Wed/Fri (2 AM UTC Tue/Thu/Sat)
5+
# Run daily at 6 PM PST (2 AM UTC next day)
6+
- cron: "0 2 * * *"
67
workflow_call:
78
inputs:
89
distro:
@@ -33,7 +34,7 @@ on:
3334
type: boolean
3435
default: false
3536
copilot-max-fixes:
36-
description: "Maximum number of issues for Copilot to fix (default: 15)"
37+
description: "Maximum number of issues for Copilot to fix (default: 1)"
3738
required: false
3839
type: string
3940
default: ""
@@ -67,7 +68,7 @@ on:
6768
type: boolean
6869
default: false
6970
copilot-max-fixes:
70-
description: "Maximum number of issues for Copilot to fix (default: 15)"
71+
description: "Maximum number of issues for Copilot to fix (default: 1)"
7172
required: false
7273
type: string
7374
default: ""
@@ -387,6 +388,14 @@ jobs:
387388
run: |
388389
set -euo pipefail
389390
391+
# Authenticate first (required for all gh commands)
392+
if [ -z "$COPILOT_OAUTH_TOKEN" ]; then
393+
echo "::error::COPILOT_OAUTH_TOKEN secret not set. \
394+
Run 'gh auth login' locally, then 'gh auth token' and add as secret."
395+
exit 1
396+
fi
397+
echo "$COPILOT_OAUTH_TOKEN" | gh auth login --with-token
398+
390399
# Check for issues
391400
if [ ! -f "/tmp/codechecker_issues.json" ]; then
392401
echo "No issues found"
@@ -404,16 +413,19 @@ jobs:
404413
echo "Found $ISSUE_COUNT issues"
405414
echo "has-issues=true" >> "$GITHUB_OUTPUT"
406415
407-
# Authenticate with OAuth token (required for agent-task)
408-
if [ -z "$COPILOT_OAUTH_TOKEN" ]; then
409-
echo "::error::COPILOT_OAUTH_TOKEN secret not set. Run 'gh auth login' locally, then 'gh auth token' and add as secret."
410-
exit 1
416+
# Check for existing open Copilot PRs to avoid duplicates
417+
OPEN_COPILOT_PRS=$(gh pr list --repo "${{ github.repository }}" \
418+
--state open --label "copilot-autofix" --json number --jq 'length' 2>/dev/null || echo "0")
419+
if [ "$OPEN_COPILOT_PRS" -gt 0 ]; then
420+
echo "⏭️ Skipping: $OPEN_COPILOT_PRS open Copilot PR(s) already exist"
421+
echo "Review and merge existing PRs before creating new ones."
422+
echo "has-issues=false" >> "$GITHUB_OUTPUT"
423+
exit 0
411424
fi
412-
echo "$COPILOT_OAUTH_TOKEN" | gh auth login --with-token
413425
414-
# Build prompt
426+
# Build prompt - default to 1 issue for focused, quality fixes
415427
LIMIT="${{ inputs.copilot-max-fixes }}"
416-
LIMIT="${LIMIT:-15}"
428+
LIMIT="${LIMIT:-1}" # Default: 1 issue per run
417429
418430
{
419431
echo "Fix these Clang Static Analyzer issues:"
@@ -442,6 +454,10 @@ jobs:
442454
if [ -n "$PR_NUMBER" ]; then
443455
echo "pr-url=https://github.com/${{ github.repository }}/pull/${PR_NUMBER}" >> "$GITHUB_OUTPUT"
444456
echo "pr-created=true" >> "$GITHUB_OUTPUT"
457+
# Add label to track Copilot PRs and prevent duplicates
458+
gh pr edit "$PR_NUMBER" -R "${{ github.repository }}" --add-label "copilot-autofix" || true
459+
# Mark PR as ready for review (not draft) so CI runs automatically
460+
gh pr ready "$PR_NUMBER" -R "${{ github.repository }}" || true
445461
gh pr comment "$PR_NUMBER" -R "${{ github.repository }}" --body "/codeowners ping" || true
446462
else
447463
echo "pr-created=false" >> "$GITHUB_OUTPUT"

.github/workflows/codeowners-group-analysis.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,6 +2318,7 @@ jobs:
23182318
# Check if we have any owners to ping
23192319
if [ -n "$SELECTED_OWNERS" ]; then
23202320
# Get full names for selected owners and build ping message
2321+
# NOTE: Do NOT use GitHub mention syntax [@username] as it subscribes users to the PR
23212322
PING_MESSAGE="Hi"
23222323
IFS=',' read -ra SELECTED_ARRAY <<< "$SELECTED_OWNERS"
23232324
OWNER_COUNT=${#SELECTED_ARRAY[@]}
@@ -2331,9 +2332,9 @@ jobs:
23312332
"$USER_API" 2>/dev/null)
23322333
USER_NAME=$(echo "$USER_DATA" | jq -r '.name // empty' 2>/dev/null)
23332334
if [ -n "$USER_NAME" ] && [ "$USER_NAME" != "null" ]; then
2334-
PING_MESSAGE="$PING_MESSAGE $USER_NAME [@$owner]"
2335+
PING_MESSAGE="$PING_MESSAGE $USER_NAME (@$owner)"
23352336
else
2336-
PING_MESSAGE="$PING_MESSAGE [@$owner]"
2337+
PING_MESSAGE="$PING_MESSAGE (@$owner)"
23372338
fi
23382339
23392340
# Add comma if not the last owner
@@ -2357,7 +2358,7 @@ jobs:
23572358
fi
23582359
fi
23592360
2360-
PING_MESSAGE="$PING_MESSAGE, this PR **[""$PR_TITLE""](${{ github.server_url }}/${{ github.repository }}/pull/$PR_NUMBER)** by $PR_AUTHOR_FULL_NAME [@$PR_AUTHOR_LOGIN] needs your approval/review to merge this."
2361+
PING_MESSAGE="$PING_MESSAGE, this PR **[""$PR_TITLE""](${{ github.server_url }}/${{ github.repository }}/pull/$PR_NUMBER)** by $PR_AUTHOR_FULL_NAME (@$PR_AUTHOR_LOGIN) needs your approval/review to merge this."
23612362
23622363
if [ "$PING_OWNERS" = "true" ]; then
23632364
# Create new ping comment
@@ -2386,6 +2387,7 @@ jobs:
23862387
23872388
if [ "$HTTP_STATUS" = "201" ]; then
23882389
echo "✅ Ping comment created successfully for PR #$PR_NUMBER"
2390+
echo "📋 Pinged users: $SELECTED_OWNERS"
23892391
else
23902392
echo "❌ ERROR: Failed to create ping comment (HTTP $HTTP_STATUS)"
23912393
echo "Response body: $RESPONSE_BODY"
@@ -2792,6 +2794,8 @@ jobs:
27922794
if [ "$(echo "$SLACK_RESPONSE" | jq -r '.ok')" = "true" ]; then
27932795
SLACK_TS=$(echo "$SLACK_RESPONSE" | jq -r '.ts')
27942796
echo "✅ Successfully sent Slack notification to channel $SLACK_CHANNEL (message ts: $SLACK_TS)"
2797+
echo "📋 Notified users: $SELECTED_OWNERS"
2798+
echo "📋 Notified groups: $SELECTED_SLACK_GROUPS"
27952799
else
27962800
SLACK_ERROR=$(echo "$SLACK_RESPONSE" | jq -r '.error // "Unknown error"')
27972801
echo "❌ Failed to send Slack notification: $SLACK_ERROR"

.github/workflows/t3000-demo-tests-impl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
fi
7979
# Print the JSON output
8080
echo "Read contents of $TESTS_YAML_PATH and converted to JSON:"
81-
echo "$filtered_output"
81+
echo "${filtered_output}"
8282
echo "matrix=${filtered_output}" >> $GITHUB_OUTPUT
8383
8484
t3000-demo-tests:

.github/workflows/t3000-integration-tests-impl.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,21 @@ jobs:
6060
sanitized_yaml=$(sed 's/\r$//' $TESTS_YAML_PATH)
6161
# Convert to JSON
6262
json_output=$(echo "${sanitized_yaml}" | yq '. | to_json(0)')
63+
# Filter by model if specified
64+
echo "[INFO] Selected model: ${{ inputs.model }}"
65+
if [ "${{ inputs.model }}" = "all" ]; then
66+
filtered_output="$json_output"
67+
echo "[INFO] Loading all tests from YAML"
68+
else
69+
# Filter tests by model-name field
70+
# Include tests where model-name matches OR model-name doesn't exist (always-run tests)
71+
filtered_output=$(echo "$json_output" | jq -c --arg model "${{ inputs.model }}" '[.[] | select(.["model-name"] == $model or (.["model-name"] == null))]')
72+
echo "[INFO] Filtered tests by model: ${{ inputs.model }}"
73+
fi
6374
# Print the JSON output
6475
echo "Read contents of $TESTS_YAML_PATH and converted to JSON:"
65-
echo "${json_output}"
66-
echo "matrix=${json_output}" >> $GITHUB_OUTPUT
76+
echo "${filtered_output}"
77+
echo "matrix=${filtered_output}" >> $GITHUB_OUTPUT
6778
6879
t3000-integration-tests:
6980
needs: load-test-matrix

.github/workflows/t3000-integration-tests.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
options:
1212
- all
1313
- tteager
14-
# - ethernet (GH #34582)
1514
- trace stress
1615
- falcon40b
1716
- llama3.2-vision
@@ -21,8 +20,6 @@ on:
2120
- llama3 accuracy
2221
- llama3_70n90b accuracy
2322
- llama3_90b
24-
# - llama3_70b
25-
# - mixtral
2623
- resnet
2724
- sd35_large
2825
- flux1

.github/workflows/t3000-unit-tests-impl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ jobs:
7373
fi
7474
# Print the JSON output
7575
echo "Read contents of $TESTS_YAML_PATH and converted to JSON:"
76-
echo "$filtered_output"
77-
echo "matrix=$filtered_output" >> $GITHUB_OUTPUT
76+
echo "${filtered_output}"
77+
echo "matrix=${filtered_output}" >> $GITHUB_OUTPUT
7878
7979
t3000-unit-tests:
8080
needs: load-test-matrix

.github/workflows/ttnn-run-sweeps.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
name: "ttnn - Run sweeps"
22

3+
run-name: >-
4+
${{
5+
github.event.inputs.sweep_name == 'ALL SWEEPS (Nightly)' && 'ttnn - Run sweeps nightly' ||
6+
github.event.inputs.sweep_name == 'ALL SWEEPS (Comprehensive)' && 'ttnn - Run sweeps comprehensive' ||
7+
github.event.inputs.sweep_name == 'ALL SWEEPS (Model Traced)' && 'ttnn - Run sweeps model traced' ||
8+
github.event.inputs.sweep_name == 'ALL SWEEPS (Lead Models)' && 'ttnn - Run sweeps lead models' ||
9+
github.event.inputs.sweep_name && format('ttnn - Run sweeps ({0})', github.event.inputs.sweep_name) ||
10+
'ttnn - Run sweeps scheduled'
11+
}}
12+
313
on:
414
workflow_dispatch:
515
inputs:
@@ -618,6 +628,7 @@ on:
618628
- cron: "0 3 * * *" # This cron schedule runs the workflow at 3:00 AM UTC daily (lead model runs)
619629
concurrency:
620630
group: ttnn-sweeps-${{ github.ref }}-${{ github.event.inputs.arch || 'wormhole_b0' }}-${{ github.event.inputs.runner-label || 'N150' }}-${{ github.event.inputs.sweep_name }}
631+
cancel-in-progress: false
621632

622633
jobs:
623634
display-workflow-options:
@@ -838,6 +849,7 @@ jobs:
838849
PYTHONPATH: /work
839850
LD_LIBRARY_PATH: /work/build/lib
840851
ARCH_NAME: ${{ matrix.test-group.arch }}
852+
RUNNER_LABEL: ${{ matrix.test-group.runner_label }}
841853
LOGURU_LEVEL: ${{ inputs.log-level }}
842854
TT_LOGGER_LEVEL: ${{ inputs.log-level }}
843855
GITHUB_ACTIONS: true
@@ -977,6 +989,7 @@ jobs:
977989
PYTHONPATH: /work
978990
LD_LIBRARY_PATH: /work/build/lib
979991
ARCH_NAME: ${{ matrix.arch }}
992+
RUNNER_LABEL: ${{ matrix.runner_label }}
980993
LOGURU_LEVEL: INFO
981994
GITHUB_ACTIONS: true
982995
TT_SMI_RESET_COMMAND: ${{ matrix.tt_smi_cmd }}

0 commit comments

Comments
 (0)